diff options
Diffstat (limited to 'media-sound/rhythmbox/files/rhythmbox-0.9.7-daap_fix.patch')
-rw-r--r-- | media-sound/rhythmbox/files/rhythmbox-0.9.7-daap_fix.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/media-sound/rhythmbox/files/rhythmbox-0.9.7-daap_fix.patch b/media-sound/rhythmbox/files/rhythmbox-0.9.7-daap_fix.patch new file mode 100644 index 000000000000..817add8c7bed --- /dev/null +++ b/media-sound/rhythmbox/files/rhythmbox-0.9.7-daap_fix.patch @@ -0,0 +1,38 @@ +--- daapsharing/rb-daap-src.c 2007/01/07 12:16:12 4725 ++++ daapsharing/rb-daap-src.c 2007/01/27 02:34:51 4760 +@@ -601,6 +601,7 @@ + gchar *request; + gchar *response; + gchar *end_headers; ++ gchar first_byte; + size_t readsize; + gboolean ok = TRUE; + guint http_status; +@@ -704,10 +705,13 @@ + } + + /* libsoup wants the headers null-terminated, despite taking a parameter +- * specifying how long they are. ++ * specifying how long they are. since the byte we overwrite to null- ++ * terminate the headers is the first byte of the response body, we need ++ * to restore it once we've parsed the response headers. + */ +- end_headers[2] = '\0'; +- end_headers += 4; ++ first_byte = end_headers[4]; ++ end_headers[4] = '\0'; ++ end_headers += 2; + + header_table = g_hash_table_new (soup_str_case_hash, soup_str_case_equal); + if (soup_headers_parse_response (response, +@@ -758,6 +762,10 @@ + g_free (http_status_phrase); + g_hash_table_destroy (header_table); + ++ /* restore the first response body byte and move on */ ++ end_headers += 2; ++ *end_headers = first_byte; ++ + /* copy remaining data into a new buffer */ + if (ok) { + src->buffer_size = readsize - (end_headers - response); |