rpms/rhythmbox/devel rhythmbox.spec, 1.168, 1.169 soup24.patch, 1.2, 1.3 rb-more-soup-debug.patch, 1.1, NONE

Bastien Nocera (hadess) fedora-extras-commits at redhat.com
Tue Feb 5 23:41:23 UTC 2008


Author: hadess

Update of /cvs/pkgs/rpms/rhythmbox/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3206

Modified Files:
	rhythmbox.spec soup24.patch 
Removed Files:
	rb-more-soup-debug.patch 
Log Message:
* Tue Feb 05 2008 - Bastien Nocera <bnocera at redhat.com> - 0.11.4-7
- Update libsoup 2.4 patch again from upstream



Index: rhythmbox.spec
===================================================================
RCS file: /cvs/pkgs/rpms/rhythmbox/devel/rhythmbox.spec,v
retrieving revision 1.168
retrieving revision 1.169
diff -u -r1.168 -r1.169
--- rhythmbox.spec	5 Feb 2008 14:31:54 -0000	1.168
+++ rhythmbox.spec	5 Feb 2008 23:40:44 -0000	1.169
@@ -3,7 +3,7 @@
 Name: rhythmbox
 Summary: Music Management Application 
 Version: 0.11.4
-Release: 6%{?dist}
+Release: 7%{?dist}
 License: GPLv2+ and GFDL+
 Group: Applications/Multimedia
 URL: http://www.gnome.org/projects/rhythmbox/
@@ -59,7 +59,6 @@
 Patch2: x-content.patch
 # http://bugzilla.gnome.org/show_bug.cgi?id=509701 
 Patch3: soup24.patch
-Patch6: rb-more-soup-debug.patch
 # http://bugzilla.gnome.org/show_bug.cgi?id=510406
 Patch4: gsd-media-player-api.patch
 
@@ -96,7 +95,6 @@
 %patch1 -p1 -b .python-threading
 %patch2 -p1 -b .x-content
 %patch3 -p1 -b .soup24
-%patch6 -p0 -b .soup-debug
 %patch4 -p0 -b .gsd
 %patch5 -p0 -b .automake
 
@@ -216,6 +214,9 @@
 %{_libdir}/rhythmbox/plugins/upnp_coherence
 
 %changelog
+* Tue Feb 05 2008 - Bastien Nocera <bnocera at redhat.com> - 0.11.4-7
+- Update libsoup 2.4 patch again from upstream
+
 * Mon Feb 04 2008 - Bastien Nocera <bnocera at redhat.com> - 0.11.4-6
 - Update libsoup 2.4 patch from upstream
 - Add patch to fix the media player keys API usage

soup24.patch:

Index: soup24.patch
===================================================================
RCS file: /cvs/pkgs/rpms/rhythmbox/devel/soup24.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- soup24.patch	4 Feb 2008 18:29:14 -0000	1.2
+++ soup24.patch	5 Feb 2008 23:40:44 -0000	1.3
@@ -1,5 +1,5 @@
 diff --git a/configure.ac b/configure.ac
-index fcb0f29..1534352 100644
+index 84212e9..a43c3ac 100644
 --- a/configure.ac
 +++ b/configure.ac
 @@ -441,18 +441,25 @@ fi
@@ -67,6 +67,32 @@
  
  dnl Multimedia keys
  have_xfree=no
+@@ -1168,7 +1157,11 @@ else
+ 	AC_MSG_NOTICE([   CD burning support disabled])
+ fi
+ if test x"$enable_daap" = xyes; then
+-	AC_MSG_NOTICE([** DAAP (music sharing) support is enabled])
++	if test x"$have_libsoup24" = "xyes"; then
++		AC_MSG_NOTICE([** DAAP (music sharing) support is enabled (using libsoup 2.4)])
++	elif test x"$have_libsoup22" = "xyes"; then
++		AC_MSG_NOTICE([** DAAP (music sharing) support is enabled (using libsoup 2.2)])
++	fi
+ else
+ 	AC_MSG_NOTICE([   DAAP (music sharing) support is disabled])
+ fi
+@@ -1198,7 +1191,11 @@ else
+ 	AC_MSG_NOTICE([   gnome-keyring support disabled])
+ fi
+ if test x"$enable_audioscrobbler" != xno; then
+-	AC_MSG_NOTICE([** Audioscrobbler support enabled])
++	if test x"$have_libsoup24" = "xyes"; then
++		AC_MSG_NOTICE([** Audioscrobbler support enabled (using libsoup 2.4)])
++	elif test x"$have_libsoup22" = "xyes"; then
++		AC_MSG_NOTICE([** Audioscrobbler support enabled (using libsoup 2.2)])
++	fi
+ else
+ 	AC_MSG_NOTICE([   Audioscrobbler support disabled])
+ fi
 diff --git a/lib/Makefile.am b/lib/Makefile.am
 index 48eb4e4..21fc6d8 100644
 --- a/lib/Makefile.am
@@ -142,10 +168,10 @@
  
 diff --git a/lib/rb-soup-compat.h b/lib/rb-soup-compat.h
 new file mode 100644
-index 0000000..69371dd
+index 0000000..8cfb005
 --- /dev/null
 +++ b/lib/rb-soup-compat.h
-@@ -0,0 +1,58 @@
+@@ -0,0 +1,59 @@
 +/*
 + *  Copyright (C) 2008  Jonathan Matthew <jonathan at d14n.org>
 + *
@@ -194,6 +220,7 @@
 +typedef SoupServerContext		SoupClientContext;
 +
 +#define SOUP_MEMORY_TAKE		SOUP_BUFFER_SYSTEM_OWNED
++#define SOUP_MEMORY_TEMPORARY		SOUP_BUFFER_USER_OWNED
 +
 +#define soup_message_headers_append	soup_message_add_header
 +#define soup_message_headers_get	soup_message_get_header
@@ -205,7 +232,7 @@
 +#endif	/* RB_SOUP_COMPAT_H */
 +
 diff --git a/plugins/audioscrobbler/rb-audioscrobbler.c b/plugins/audioscrobbler/rb-audioscrobbler.c
-index bae52e3..a57a571 100644
+index 192e62d..73ea7a5 100644
 --- a/plugins/audioscrobbler/rb-audioscrobbler.c
 +++ b/plugins/audioscrobbler/rb-audioscrobbler.c
 @@ -24,6 +24,8 @@
@@ -229,7 +256,7 @@
  #include "eel-gconf-extensions.h"
  #include "rb-audioscrobbler.h"
  #include "rb-debug.h"
-@@ -193,14 +194,20 @@ static gboolean	     rb_audioscrobbler_timeout_cb (RBAudioscrobbler *audioscrobb
+@@ -195,14 +196,20 @@ static gboolean	     rb_audioscrobbler_timeout_cb (RBAudioscrobbler *audioscrobb
  
  static gchar *	     mkmd5 (char *string);
  static void	     rb_audioscrobbler_parse_response (RBAudioscrobbler *audioscrobbler, SoupMessage *msg);
@@ -255,7 +282,7 @@
  
  static void	     rb_audioscrobbler_import_settings (RBAudioscrobbler *audioscrobbler);
  static void	     rb_audioscrobbler_preferences_sync (RBAudioscrobbler *audioscrobbler);
-@@ -688,18 +695,31 @@ mkmd5 (char *string)
+@@ -690,18 +697,31 @@ mkmd5 (char *string)
  static void
  rb_audioscrobbler_parse_response (RBAudioscrobbler *audioscrobbler, SoupMessage *msg)
  {
@@ -291,7 +318,7 @@
  
  		g_free (audioscrobbler->priv->status_msg);
  		audioscrobbler->priv->status = STATUS_OK;
-@@ -771,10 +791,16 @@ rb_audioscrobbler_parse_response (RBAudioscrobbler *audioscrobbler, SoupMessage
+@@ -773,10 +793,12 @@ rb_audioscrobbler_parse_response (RBAudioscrobbler *audioscrobbler, SoupMessage
  			audioscrobbler->priv->submit_next = time(NULL) + audioscrobbler->priv->submit_interval;
  
  		g_strfreev (breaks);
@@ -300,15 +327,12 @@
 +#endif
  	} else {
  		audioscrobbler->priv->status = REQUEST_FAILED;
-+#if defined(HAVE_LIBSOUP_2_4)
+-		audioscrobbler->priv->status_msg = g_strdup (soup_status_get_phrase (msg->status_code));
 +		audioscrobbler->priv->status_msg = g_strdup (msg->reason_phrase);
-+#else
- 		audioscrobbler->priv->status_msg = g_strdup (soup_status_get_phrase (msg->status_code));
-+#endif
  	}
  }
  
-@@ -793,7 +819,7 @@ static void
+@@ -795,25 +817,25 @@ static void
  rb_audioscrobbler_perform (RBAudioscrobbler *audioscrobbler,
  			   char *url,
  			   char *post_data,
@@ -317,7 +341,11 @@
  {
  	SoupMessage *msg;
  
-@@ -803,14 +829,14 @@ rb_audioscrobbler_perform (RBAudioscrobbler *audioscrobbler,
+ 	msg = soup_message_new (post_data == NULL ? "GET" : "POST", url);
+-	soup_message_add_header (msg->request_headers, "User-Agent", USER_AGENT);
++	soup_message_headers_append (msg->request_headers, "User-Agent", USER_AGENT);
+ 
+ 	if (post_data != NULL) {
  		rb_debug ("Submitting to Audioscrobbler: %s", post_data);
  		soup_message_set_request (msg,
  					  "application/x-www-form-urlencoded",
@@ -334,7 +362,7 @@
  
  		uri = rb_proxy_config_get_libsoup_uri (audioscrobbler->priv->proxy_config);
  		audioscrobbler->priv->soup_session = soup_session_async_new_with_options (
-@@ -891,8 +917,13 @@ rb_audioscrobbler_do_handshake (RBAudioscrobbler *audioscrobbler)
+@@ -894,8 +916,13 @@ rb_audioscrobbler_do_handshake (RBAudioscrobbler *audioscrobbler)
  }
  
  
@@ -348,7 +376,7 @@
  {
  	RBAudioscrobbler *audioscrobbler = RB_AUDIOSCROBBLER(user_data);
  
-@@ -1049,8 +1080,13 @@ rb_g_queue_concat (GQueue *q1, GQueue *q2)
+@@ -1052,8 +1079,13 @@ rb_g_queue_concat (GQueue *q1, GQueue *q2)
  	}
  }
  
@@ -362,7 +390,7 @@
  {
  	RBAudioscrobbler *audioscrobbler = RB_AUDIOSCROBBLER (user_data);
  
-@@ -1232,7 +1268,7 @@ static void
+@@ -1235,7 +1267,7 @@ static void
  rb_audioscrobbler_proxy_config_changed_cb (RBProxyConfig *config,
  					   RBAudioscrobbler *audioscrobbler)
  {
@@ -384,7 +412,7 @@
  
  #define RB_TYPE_LASTFM_SRC (rb_lastfm_src_get_type())
 diff --git a/plugins/audioscrobbler/rb-lastfm-source.c b/plugins/audioscrobbler/rb-lastfm-source.c
-index e119cab..6142c1c 100644
+index 4859cce..9661fcd 100644
 --- a/plugins/audioscrobbler/rb-lastfm-source.c
 +++ b/plugins/audioscrobbler/rb-lastfm-source.c
 @@ -42,8 +42,8 @@
@@ -397,7 +425,7 @@
  
  #include "md5.h"
  
-@@ -100,8 +100,12 @@ static char* rb_lastfm_source_get_playback_uri (RhythmDBEntry *entry, gpointer d
+@@ -101,8 +101,12 @@ static char* rb_lastfm_source_get_playback_uri (RhythmDBEntry *entry, gpointer d
  static void rb_lastfm_perform (RBLastfmSource *lastfm,
  			       const char *url,
  			       char *post_data, /* this takes ownership */
@@ -411,7 +439,7 @@
  static void rb_lastfm_change_station (RBLastfmSource *source, const char *station);
  
  static void rb_lastfm_proxy_config_changed_cb (RBProxyConfig *config,
-@@ -724,7 +728,7 @@ static void
+@@ -725,31 +729,29 @@ static void
  rb_lastfm_perform (RBLastfmSource *source,
  		   const char *url,
  		   char *post_data,
@@ -420,17 +448,17 @@
  {
  	SoupMessage *msg;
  	msg = soup_message_new ("GET", url);
-@@ -732,7 +736,9 @@ rb_lastfm_perform (RBLastfmSource *source,
+-	soup_message_add_header (msg->request_headers, "User-Agent", USER_AGENT);
++	soup_message_headers_append (msg->request_headers, "User-Agent", USER_AGENT);
+ 
  	if (msg == NULL)
  		return;
  
-+#if defined(HAVE_LIBSOUP_2_2)
- 	soup_message_set_http_version (msg, SOUP_HTTP_1_1);
-+#endif
- 
+-	soup_message_set_http_version (msg, SOUP_HTTP_1_1);
+-
  	rb_debug ("Last.fm communicating with %s", url);
  
-@@ -740,14 +746,14 @@ rb_lastfm_perform (RBLastfmSource *source,
+ 	if (post_data != NULL) {
  		rb_debug ("POST data: %s", post_data);
  		soup_message_set_request (msg,
  					  "application/x-www-form-urlencoded",
@@ -447,7 +475,7 @@
  
  		uri = rb_proxy_config_get_libsoup_uri (source->priv->proxy_config);
  		source->priv->soup_session = soup_session_async_new_with_options (
-@@ -759,27 +765,45 @@ rb_lastfm_perform (RBLastfmSource *source,
+@@ -761,27 +763,45 @@ rb_lastfm_perform (RBLastfmSource *source,
  
  	soup_session_queue_message (source->priv->soup_session,
  				    msg,
@@ -497,7 +525,7 @@
  
  	rb_debug ("response body: %s", body);
  
-@@ -787,7 +811,6 @@ rb_lastfm_message_cb (SoupMessage *req, gpointer user_data)
+@@ -789,7 +809,6 @@ rb_lastfm_message_cb (SoupMessage *req, gpointer user_data)
  		source->priv->status = NO_ARTIST;
  	}
  
@@ -505,7 +533,7 @@
  	pieces = g_strsplit (body, "\n", 0);
  	for (i = 0; pieces[i] != NULL; i++) {
  		gchar **values = g_strsplit (pieces[i], "=", 2);
-@@ -856,10 +879,14 @@ rb_lastfm_message_cb (SoupMessage *req, gpointer user_data)
+@@ -858,10 +877,14 @@ rb_lastfm_message_cb (SoupMessage *req, gpointer user_data)
  			rhythmdb_commit (source->priv->db);
  
  		}
@@ -521,7 +549,7 @@
  
  	/* doesn't work yet
  	if (source->priv->pending_entry) {
-@@ -898,7 +925,7 @@ static void
+@@ -900,7 +923,7 @@ static void
  rb_lastfm_proxy_config_changed_cb (RBProxyConfig *config,
  					   RBLastfmSource *source)
  {
@@ -530,7 +558,7 @@
  
  	if (source->priv->soup_session) {
  		uri = rb_proxy_config_get_libsoup_uri (config);
-@@ -1163,10 +1190,16 @@ rb_lastfm_source_add_station_cb (GtkButton *button, gpointer *data)
+@@ -1165,10 +1188,16 @@ rb_lastfm_source_add_station_cb (GtkButton *button, gpointer *data)
  	g_free(title);
  }
  
@@ -548,7 +576,7 @@
  	char **pieces;
  	int p;
  	RhythmDBEntry *entry;
-@@ -1179,10 +1212,16 @@ rb_lastfm_source_metadata_cb (SoupMessage *req, RBLastfmSource *source)
+@@ -1181,10 +1210,16 @@ rb_lastfm_source_metadata_cb (SoupMessage *req, RBLastfmSource *source)
  	}
  
  	rb_debug ("got response to metadata request");
@@ -568,7 +596,7 @@
  	pieces = g_strsplit (body, "\n", 0);
  	found_cover = FALSE;
  
-@@ -1238,7 +1277,9 @@ rb_lastfm_source_metadata_cb (SoupMessage *req, RBLastfmSource *source)
+@@ -1240,7 +1275,9 @@ rb_lastfm_source_metadata_cb (SoupMessage *req, RBLastfmSource *source)
  	}
  
  	g_strfreev (pieces);
@@ -579,7 +607,7 @@
  
  	if (found_cover == FALSE) {
  		GValue v = {0,};
-@@ -1271,7 +1312,7 @@ rb_lastfm_source_new_song_cb (GObject *player_backend,
+@@ -1273,7 +1310,7 @@ rb_lastfm_source_new_song_cb (GObject *player_backend,
  			       source->priv->base_url,
  			       source->priv->base_path,
  			       source->priv->session);
@@ -589,7 +617,7 @@
  
  	/* re-enable actions */
 diff --git a/plugins/daap/rb-daap-connection.c b/plugins/daap/rb-daap-connection.c
-index 249cceb..a1b1536 100644
+index 249cceb..5cac933 100644
 --- a/plugins/daap/rb-daap-connection.c
 +++ b/plugins/daap/rb-daap-connection.c
 @@ -33,10 +33,8 @@
@@ -604,19 +632,7 @@
  
  #include "rb-daap-hash.h"
  #include "rb-daap-connection.h"
-@@ -46,6 +44,11 @@
- #include "rb-debug.h"
- #include "rb-util.h"
- 
-+/* g_base64_encode was introduced in glib 2.12 */
-+#if (GLIB_MINOR_VERSION > 11)
-+#define HAVE_G_BASE64_ENCODE
-+#endif
-+
- #define RB_DAAP_USER_AGENT "iTunes/4.6 (Windows; N)"
- 
- static void      rb_daap_connection_dispose      (GObject *obj);
-@@ -84,7 +87,7 @@ struct RBDAAPConnectionPrivate {
+@@ -84,7 +82,7 @@ struct RBDAAPConnectionPrivate {
  	gboolean is_connecting;
  
  	SoupSession *session;
@@ -625,7 +641,7 @@
  	gchar *daap_base_uri;
  
  	gdouble daap_version;
-@@ -329,7 +332,7 @@ build_message (RBDAAPConnection *connection,
+@@ -329,7 +327,7 @@ build_message (RBDAAPConnection *connection,
  {
  	RBDAAPConnectionPrivate *priv = connection->priv;
  	SoupMessage *message = NULL;
@@ -634,13 +650,11 @@
  
  	uri = soup_uri_new_with_base (priv->base_uri, path);
  	if (uri == NULL) {
-@@ -337,14 +340,16 @@ build_message (RBDAAPConnection *connection,
+@@ -337,14 +335,13 @@ build_message (RBDAAPConnection *connection,
  	}
  
  	message = soup_message_new_from_uri (SOUP_METHOD_GET, uri);
-+#if defined(HAVE_LIBSOUP_2_2)
- 	soup_message_set_http_version (message, SOUP_HTTP_1_1);
-+#endif
+-	soup_message_set_http_version (message, SOUP_HTTP_1_1);
  
 -	soup_message_add_header (message->request_headers, "Client-DAAP-Version", 	"3.0");
 -	soup_message_add_header (message->request_headers, "Accept-Language", 		"en-us, en;q=5.0");
@@ -655,11 +669,11 @@
  
  	if (priv->password_protected) {
  		char *h;
-@@ -352,13 +357,17 @@ build_message (RBDAAPConnection *connection,
+@@ -352,13 +349,17 @@ build_message (RBDAAPConnection *connection,
  		char *token;
  
  		user_pass = g_strdup_printf ("%s:%s", priv->username, priv->password);
-+#if defined(HAVE_G_BASE64_ENCODE)
++#if defined(HAVE_LIBSOUP_2_4)
 +		token = g_base64_encode ((guchar *)user_pass, strlen (user_pass));
 +#else
  		token = soup_base64_encode (user_pass, strlen (user_pass));
@@ -674,7 +688,7 @@
  		g_free (h);
  	}
  
-@@ -372,10 +381,10 @@ build_message (RBDAAPConnection *connection,
+@@ -372,10 +373,10 @@ build_message (RBDAAPConnection *connection,
  
  		rb_daap_hash_generate ((short)floor (version), (const guchar*)no_daap_path, 2, (guchar*)hash, req_id);
  
@@ -687,7 +701,7 @@
  	}
  
  	soup_uri_free (uri);
-@@ -425,16 +434,22 @@ actual_http_response_handler (DAAPResponseData *data)
+@@ -425,16 +426,22 @@ actual_http_response_handler (DAAPResponseData *data)
  {
  	RBDAAPConnectionPrivate *priv;
  	GNode *structure;
@@ -712,7 +726,7 @@
  
  	message_path = soup_uri_to_string (soup_message_get_uri (data->message), FALSE);
  
-@@ -444,13 +459,12 @@ actual_http_response_handler (DAAPResponseData *data)
+@@ -444,13 +451,12 @@ actual_http_response_handler (DAAPResponseData *data)
  		  data->message->reason_phrase);
  
  	if (data->message->response_headers) {
@@ -727,7 +741,7 @@
  		unsigned int factor = 4;
  		unsigned int unc_size = response_length * factor;
  
-@@ -575,19 +589,23 @@ actual_http_response_handler (DAAPResponseData *data)
+@@ -575,19 +581,23 @@ actual_http_response_handler (DAAPResponseData *data)
  		rb_daap_structure_destroy (structure);
  	}
  
@@ -755,7 +769,7 @@
  {
  	DAAPResponseData *data;
  	int response_length;
-@@ -599,7 +617,11 @@ http_response_handler (SoupMessage      *message,
+@@ -599,7 +609,11 @@ http_response_handler (SoupMessage      *message,
  
  	data = g_new0 (DAAPResponseData, 1);
  	data->status = message->status_code;
@@ -767,7 +781,7 @@
  
  	g_object_ref (G_OBJECT (connection));
  	data->connection = connection;
-@@ -655,7 +677,7 @@ http_get (RBDAAPConnection     *connection,
+@@ -655,7 +669,7 @@ http_get (RBDAAPConnection     *connection,
  	priv->use_response_handler_thread = use_thread;
  	priv->response_handler = handler;
  	soup_session_queue_message (priv->session, message,
@@ -776,11 +790,11 @@
  				    connection);
  	rb_debug ("Queued message for http://%s:%d/%s",
  		  priv->base_uri->host,
-@@ -1674,7 +1696,11 @@ rb_daap_connection_get_headers (RBDAAPConnection *connection,
+@@ -1674,7 +1688,11 @@ rb_daap_connection_get_headers (RBDAAPConnection *connection,
  		char *token;
  
  		user_pass = g_strdup_printf ("%s:%s", priv->username, priv->password);
-+#if defined(HAVE_G_BASE64_ENCODE)
++#if defined(HAVE_LIBSOUP_2_4)
 +		token = g_base64_encode ((guchar *)user_pass, strlen (user_pass));
 +#else
  		token = soup_base64_encode (user_pass, strlen (user_pass));
@@ -813,7 +827,7 @@
  				    data);
  }
 diff --git a/plugins/daap/rb-daap-share.c b/plugins/daap/rb-daap-share.c
-index a246864..bca5b52 100644
+index a246864..9be71ec 100644
 --- a/plugins/daap/rb-daap-share.c
 +++ b/plugins/daap/rb-daap-share.c
 @@ -27,13 +27,9 @@
@@ -860,20 +874,19 @@
  }
  
  static void
-@@ -543,14 +541,19 @@ message_set_from_rb_daap_structure (SoupMessage *message,
+@@ -543,14 +541,15 @@ message_set_from_rb_daap_structure (SoupMessage *message,
  		return;
  	}
  
-+#if defined(HAVE_LIBSOUP_2_4)
+-	message->response.owner = SOUP_BUFFER_SYSTEM_OWNED;
+-	message->response.length = length;
+-	message->response.body = resp;
 +	soup_message_set_response (message, "application/x-dmap-tagged", SOUP_MEMORY_TAKE, resp, length);
-+#else
- 	message->response.owner = SOUP_BUFFER_SYSTEM_OWNED;
- 	message->response.length = length;
- 	message->response.body = resp;
- 
++
++#if defined(HAVE_LIBSOUP_2_2)
 +	soup_server_message_set_encoding (SOUP_SERVER_MESSAGE (message), SOUP_TRANSFER_CONTENT_LENGTH);
 +#endif
-+
+ 
  	message_add_standard_headers (message);
  
  	soup_message_set_status (message, SOUP_STATUS_OK);
@@ -881,7 +894,7 @@
  }
  
  #define DMAP_STATUS_OK 200
-@@ -559,10 +562,20 @@ message_set_from_rb_daap_structure (SoupMessage *message,
+@@ -559,10 +558,20 @@ message_set_from_rb_daap_structure (SoupMessage *message,
  #define DAAP_VERSION 3.0
  #define DMAP_TIMEOUT 1800
  
@@ -902,7 +915,7 @@
  {
  /* MSRV	server info response
   * 	MSTT status
-@@ -619,10 +632,20 @@ server_info_cb (RBDAAPShare *share,
+@@ -619,10 +628,20 @@ server_info_cb (RBDAAPShare *share,
  	rb_daap_structure_destroy (msrv);
  }
  
@@ -923,7 +936,7 @@
  {
  /* MCCR content codes response
   * 	MSTT status
-@@ -656,6 +679,48 @@ content_codes_cb (RBDAAPShare *share,
+@@ -656,6 +675,48 @@ content_codes_cb (RBDAAPShare *share,
  	rb_daap_structure_destroy (mccr);
  }
  
@@ -972,7 +985,7 @@
  static gboolean
  message_get_session_id (SoupMessage *message,
  			guint32     *id)
-@@ -729,11 +794,13 @@ message_get_revision_number (SoupMessage *message,
+@@ -729,11 +790,13 @@ message_get_revision_number (SoupMessage *message,
  
  	return TRUE;
  }
@@ -987,7 +1000,7 @@
  		     guint32           *id)
  {
  	guint32     session_id;
-@@ -745,7 +812,11 @@ session_id_validate (RBDAAPShare       *share,
+@@ -745,7 +808,11 @@ session_id_validate (RBDAAPShare       *share,
  		*id = 0;
  	}
  
@@ -999,7 +1012,7 @@
  	if (! res) {
  		rb_debug ("Validation failed: Unable to parse session id from message");
  		return FALSE;
-@@ -758,7 +829,7 @@ session_id_validate (RBDAAPShare       *share,
+@@ -758,7 +825,7 @@ session_id_validate (RBDAAPShare       *share,
  		return FALSE;
  	}
  
@@ -1008,7 +1021,7 @@
  	rb_debug ("Validating session id %u from %s matches %s",
  		  session_id, remote_address, addr);
  	if (remote_address == NULL || strcmp (addr, remote_address) != 0) {
-@@ -775,7 +846,7 @@ session_id_validate (RBDAAPShare       *share,
+@@ -775,7 +842,7 @@ session_id_validate (RBDAAPShare       *share,
  
  static guint32
  session_id_generate (RBDAAPShare       *share,
@@ -1017,7 +1030,7 @@
  {
  	guint32 id;
  
-@@ -786,7 +857,7 @@ session_id_generate (RBDAAPShare       *share,
+@@ -786,7 +853,7 @@ session_id_generate (RBDAAPShare       *share,
  
  static guint32
  session_id_create (RBDAAPShare       *share,
@@ -1026,7 +1039,7 @@
  {
  	guint32     id;
  	const char *addr;
-@@ -802,7 +873,7 @@ session_id_create (RBDAAPShare       *share,
+@@ -802,7 +869,7 @@ session_id_create (RBDAAPShare       *share,
  	} while	(addr != NULL);
  
  	/* store session id and remote address */
@@ -1035,7 +1048,7 @@
  	g_hash_table_insert (share->priv->session_ids, GUINT_TO_POINTER (id), remote_address);
  
  	return id;
-@@ -810,16 +881,26 @@ session_id_create (RBDAAPShare       *share,
+@@ -810,16 +877,26 @@ session_id_create (RBDAAPShare       *share,
  
  static void
  session_id_remove (RBDAAPShare       *share,
@@ -1065,7 +1078,7 @@
  {
  /* MLOG login response
   * 	MSTT status
-@@ -840,15 +921,28 @@ login_cb (RBDAAPShare *share,
+@@ -840,15 +917,28 @@ login_cb (RBDAAPShare *share,
  	rb_daap_structure_destroy (mlog);
  }
  
@@ -1095,7 +1108,7 @@
  		rb_debug ("Handling logout session id %u", id);
  		session_id_remove (share, context, id);
  
-@@ -858,18 +952,34 @@ logout_cb (RBDAAPShare *share,
+@@ -858,18 +948,34 @@ logout_cb (RBDAAPShare *share,
  	}
  
  	soup_message_set_status (message, status);
@@ -1130,7 +1143,7 @@
  
  	if (res && revision_number != share->priv->revision_number) {
  		/* MUPD update response
-@@ -885,8 +995,15 @@ update_cb (RBDAAPShare *share,
+@@ -885,8 +991,15 @@ update_cb (RBDAAPShare *share,
  		message_set_from_rb_daap_structure (message, mupd);
  		rb_daap_structure_destroy (mupd);
  	} else {
@@ -1146,7 +1159,7 @@
  	}
  }
  
-@@ -1151,14 +1268,47 @@ add_playlist_entry_to_mlcl (GtkTreeModel *model,
+@@ -1151,14 +1264,47 @@ add_playlist_entry_to_mlcl (GtkTreeModel *model,
  }
  
  static bitwise
@@ -1197,7 +1210,7 @@
  
  	start_of_attrs = strstr (s, "meta=");
  	if (start_of_attrs == NULL) {
-@@ -1173,23 +1323,12 @@ parse_meta (const gchar *s)
+@@ -1173,23 +1319,12 @@ parse_meta (const gchar *s)
  		attrs = g_strdup (start_of_attrs);
  	}
  
@@ -1223,7 +1236,7 @@
  
  static void
  write_next_chunk (SoupMessage *message, GnomeVFSHandle *handle)
-@@ -1200,10 +1339,18 @@ write_next_chunk (SoupMessage *message, GnomeVFSHandle *handle)
+@@ -1200,10 +1335,18 @@ write_next_chunk (SoupMessage *message, GnomeVFSHandle *handle)
  
  	result = gnome_vfs_read (handle, chunk, DAAP_SHARE_CHUNK_SIZE, &read_size);
  	if (result == GNOME_VFS_OK && read_size > 0) {
@@ -1242,7 +1255,7 @@
  	}
  }
  
-@@ -1241,7 +1388,11 @@ send_chunked_file (SoupMessage *message, RhythmDBEntry *entry, guint64 file_size
+@@ -1241,7 +1384,11 @@ send_chunked_file (SoupMessage *message, RhythmDBEntry *entry, guint64 file_size
  		file_size -= offset;
  	}
  
@@ -1254,26 +1267,25 @@
  
  	g_signal_connect (message, "wrote_chunk", G_CALLBACK (write_next_chunk), handle);
  	g_signal_connect (message, "finished", G_CALLBACK (chunked_message_finished), handle);
-@@ -1271,11 +1422,18 @@ send_mapped_file (SoupMessage *message, RhythmDBEntry *entry, guint64 file_size,
+@@ -1271,11 +1418,14 @@ send_mapped_file (SoupMessage *message, RhythmDBEntry *entry, guint64 file_size,
  		g_warning ("Unable to map file %s: %s", path, error->message);
  		soup_message_set_status (message, SOUP_STATUS_INTERNAL_SERVER_ERROR);
  	} else {
-+#if defined(HAVE_LIBSOUP_2_4)
+-		message->response.owner = SOUP_BUFFER_USER_OWNED;
+-		message->response.length = file_size;
+-		message->response.body = g_mapped_file_get_contents (mapped_file) + offset;
 +		soup_message_set_response (message, "application/x-dmap-tagged",
 +					   SOUP_MEMORY_TEMPORARY,
 +					   g_mapped_file_get_contents (mapped_file) + offset,
 +					   file_size);
-+#else
- 		message->response.owner = SOUP_BUFFER_USER_OWNED;
- 		message->response.length = file_size;
- 		message->response.body = g_mapped_file_get_contents (mapped_file) + offset;
++#if defined(HAVE_LIBSOUP_2_2)
  		soup_server_message_set_encoding (SOUP_SERVER_MESSAGE (message),
  						  SOUP_TRANSFER_CONTENT_LENGTH);
 +#endif
  
  		g_signal_connect (message,
  				  "finished",
-@@ -1286,22 +1444,40 @@ send_mapped_file (SoupMessage *message, RhythmDBEntry *entry, guint64 file_size,
+@@ -1286,22 +1436,40 @@ send_mapped_file (SoupMessage *message, RhythmDBEntry *entry, guint64 file_size,
  }
  #endif
  
@@ -1317,7 +1329,7 @@
  
  	rest_of_path = strchr (path + 1, '/');
  
-@@ -1338,7 +1514,11 @@ databases_cb (RBDAAPShare *share,
+@@ -1338,7 +1506,11 @@ databases_cb (RBDAAPShare *share,
  
  		message_set_from_rb_daap_structure (message, avdb);
  		rb_daap_structure_destroy (avdb);
@@ -1329,7 +1341,7 @@
  	/* ADBS database songs
  	 * 	MSTT status
  	 * 	MUTY update type
-@@ -1354,7 +1534,11 @@ databases_cb (RBDAAPShare *share,
+@@ -1354,7 +1526,11 @@ databases_cb (RBDAAPShare *share,
  		gint32 num_songs = rhythmdb_entry_count_by_type (share->priv->db, share->priv->entry_type);
  		struct MLCL_Bits mb = {NULL,0};
  
@@ -1341,7 +1353,7 @@
  
  		adbs = rb_daap_structure_add (NULL, RB_DAAP_CC_ADBS);
  		rb_daap_structure_add (adbs, RB_DAAP_CC_MSTT, (gint32) DMAP_STATUS_OK);
-@@ -1368,7 +1552,11 @@ databases_cb (RBDAAPShare *share,
+@@ -1368,7 +1544,11 @@ databases_cb (RBDAAPShare *share,
  		message_set_from_rb_daap_structure (message, adbs);
  		rb_daap_structure_destroy (adbs);
  		adbs = NULL;
@@ -1353,7 +1365,7 @@
  	/* APLY database playlists
  	 * 	MSTT status
  	 * 	MUTY update type
-@@ -1405,6 +1593,7 @@ databases_cb (RBDAAPShare *share,
+@@ -1405,6 +1585,7 @@ databases_cb (RBDAAPShare *share,
  
  		message_set_from_rb_daap_structure (message, aply);
  		rb_daap_structure_destroy (aply);
@@ -1361,7 +1373,7 @@
  	} else if (g_ascii_strncasecmp ("/1/containers/", rest_of_path, 14) == 0) {
  	/* APSO playlist songs
  	 * 	MSTT status
-@@ -1423,7 +1612,11 @@ databases_cb (RBDAAPShare *share,
+@@ -1423,7 +1604,11 @@ databases_cb (RBDAAPShare *share,
  		struct MLCL_Bits mb = {NULL,0};
  		gint pl_id = atoi (rest_of_path + 14);
  
@@ -1373,7 +1385,7 @@
  
  		apso = rb_daap_structure_add (NULL, RB_DAAP_CC_APSO);
  		rb_daap_structure_add (apso, RB_DAAP_CC_MSTT, (gint32) DMAP_STATUS_OK);
-@@ -1450,9 +1643,11 @@ databases_cb (RBDAAPShare *share,
+@@ -1450,9 +1635,11 @@ databases_cb (RBDAAPShare *share,
  						  _find_by_id);
  			if (idl == NULL) {
  				soup_message_set_status (message, SOUP_STATUS_NOT_FOUND);
@@ -1385,7 +1397,7 @@
  				goto out;
  			}
  			id = (RBPlaylistID *)idl->data;
-@@ -1473,7 +1668,7 @@ databases_cb (RBDAAPShare *share,
+@@ -1473,7 +1660,7 @@ databases_cb (RBDAAPShare *share,
  		rb_daap_structure_destroy (apso);
  	} else if (g_ascii_strncasecmp ("/1/items/", rest_of_path, 9) == 0) {
  	/* just the file :) */
@@ -1394,7 +1406,7 @@
  		gint id;
  		RhythmDBEntry *entry;
  		const gchar *location;
-@@ -1489,9 +1684,9 @@ databases_cb (RBDAAPShare *share,
+@@ -1489,9 +1676,9 @@ databases_cb (RBDAAPShare *share,
  		file_size = rhythmdb_entry_get_uint64 (entry, RHYTHMDB_PROP_FILE_SIZE);
  
  		message_add_standard_headers (message);
@@ -1406,7 +1418,7 @@
  		if (range_header) {
  			const gchar *s;
  			gchar *content_range;
-@@ -1500,7 +1695,7 @@ databases_cb (RBDAAPShare *share,
+@@ -1500,7 +1687,7 @@ databases_cb (RBDAAPShare *share,
  			offset = atoll (s);
  
  			content_range = g_strdup_printf ("bytes %" G_GUINT64_FORMAT "-%" G_GUINT64_FORMAT "/%" G_GUINT64_FORMAT, offset, file_size, file_size);
@@ -1415,7 +1427,7 @@
  			g_free (content_range);
  
  			soup_message_set_status (message, SOUP_STATUS_PARTIAL_CONTENT);
-@@ -1525,9 +1720,92 @@ databases_cb (RBDAAPShare *share,
+@@ -1525,9 +1712,92 @@ databases_cb (RBDAAPShare *share,
  	}
  
  out:
@@ -1508,7 +1520,7 @@
  typedef void (* DAAPPathFunction) (RBDAAPShare       *share,
  				   SoupServerContext *context,
  				   SoupMessage       *message);
-@@ -1570,42 +1848,6 @@ server_cb (SoupServerContext *context,
+@@ -1570,42 +1840,6 @@ server_cb (SoupServerContext *context,
  	g_free (path);
  }
  
@@ -1551,7 +1563,7 @@
  static gboolean
  soup_auth_callback (SoupServerAuthContext *auth_ctx,
                      SoupServerAuth        *auth,
-@@ -1645,12 +1887,14 @@ soup_auth_callback (SoupServerAuthContext *auth_ctx,
+@@ -1645,12 +1879,14 @@ soup_auth_callback (SoupServerAuthContext *auth_ctx,
  	return allowed;
  }
  
@@ -1567,7 +1579,7 @@
  
  	share->priv->server = soup_server_new (SOUP_SERVER_PORT, port, NULL);
  	if (share->priv->server == NULL) {
-@@ -1669,6 +1913,22 @@ rb_daap_share_server_start (RBDAAPShare *share)
+@@ -1669,6 +1905,22 @@ rb_daap_share_server_start (RBDAAPShare *share)
  	password_required = (share->priv->auth_method != RB_DAAP_SHARE_AUTH_METHOD_NONE);
  
  	if (password_required) {
@@ -1590,7 +1602,7 @@
  		auth_ctx.types = SOUP_AUTH_TYPE_BASIC;
  		auth_ctx.callback = (SoupServerAuthCallbackFn)soup_auth_callback;
  		auth_ctx.user_data = share;
-@@ -1692,14 +1952,36 @@ rb_daap_share_server_start (RBDAAPShare *share)
+@@ -1692,14 +1944,36 @@ rb_daap_share_server_start (RBDAAPShare *share)
  					 (SoupServerCallbackFn)server_cb,
  					 NULL,
  					 share);


--- rb-more-soup-debug.patch DELETED ---




More information about the fedora-extras-commits mailing list