[libdmapsharing] Fix URI handling when using IPv6 IP address (Rhythmbox bug #584244). Signed-off-by: W. Michael Petul



commit 471ba0b2158623efc84417a9f73e471089aa838e
Author: W. Michael Petullo <mike flyn org>
Date:   Thu Mar 11 21:12:14 2010 -0500

    Fix URI handling when using IPv6 IP address (Rhythmbox bug #584244).
    Signed-off-by: W. Michael Petullo <mike flyn org>

 ChangeLog                        |    4 ++++
 libdmapsharing/dmap-connection.c |    8 ++++----
 2 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 1674f5a..8de2bee 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+11 March 2010 W. Michael Petullo <mike flyn org>
+
+	* Add user agent header to requests (Rhythmbox bug #610440).
+
 27 February 2010 W. Michael Petullo <mike flyn org>
 
 	* Change dmap_connection_get_headers so that it no longer takes a
diff --git a/libdmapsharing/dmap-connection.c b/libdmapsharing/dmap-connection.c
index dbf8588..41f8707 100644
--- a/libdmapsharing/dmap-connection.c
+++ b/libdmapsharing/dmap-connection.c
@@ -1294,7 +1294,6 @@ dmap_connection_connect (DMAPConnection        *connection,
 			    gpointer                 user_data)
 {
 	ConnectionResponseData *rdata;
-	char                   *path;
 
 	g_return_if_fail (IS_DMAP_CONNECTION (connection));
 	g_return_if_fail (connection->priv->state == DMAP_GET_INFO);
@@ -1303,9 +1302,10 @@ dmap_connection_connect (DMAPConnection        *connection,
 
 	connection->priv->session = soup_session_async_new ();
 
-	path = g_strdup_printf ("http://%s:%d";, connection->priv->host, connection->priv->port);
-	connection->priv->base_uri = soup_uri_new (path);
-	g_free (path);
+	connection->priv->base_uri = soup_usr_new (NULL);
+	soup_uri_set_scheme (connection->priv->base_uri, SOUP_URI_SCHEME_HTTP);
+	soup_uri_set_host (connection->priv->base_uri, connection->priv->host);
+	soup_uri_set_port (connection->priv->base_uri, connection->priv->port);
 
 	if (connection->priv->base_uri == NULL) {
 		g_debug ("Error parsing http://%s:%d";, connection->priv->host, connection->priv->port);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]