/pidgin/main: 738d76cfdb6e: Check if the URLBase is empty in the...

Jorge Villase?or salinasv at pidgin.im
Tue Jan 29 17:00:20 EST 2013


Changeset: 738d76cfdb6e25cf881f7f3b359e975de23c3d5c
Author:	 Jorge Villase?or <salinasv at pidgin.im>
Date:	 2012-11-20 15:33 -0600
Branch:	 default
URL: http://hg.pidgin.im/pidgin/main/rev/738d76cfdb6e

Description:

Check if the URLBase is empty in the xml-element instead of reying on it being present. This avioid upnp failing in certain routers.

Thanks Ferdinand Stehle for the patch
Fixes #15373

diffstat:

 COPYRIGHT        |  1 +
 libpurple/upnp.c |  4 +++-
 2 files changed, 4 insertions(+), 1 deletions(-)

diffs (25 lines):

diff --git a/COPYRIGHT b/COPYRIGHT
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -510,6 +510,7 @@ Peter Speybrouck
 Lex Spoon
 Chris Stafford
 Kevin Stange
+Ferdinand Stehle
 Joshua Stein
 Jakub Steiner
 Richard Stellingwerff
diff --git a/libpurple/upnp.c b/libpurple/upnp.c
--- a/libpurple/upnp.c
+++ b/libpurple/upnp.c
@@ -259,7 +259,9 @@ purple_upnp_parse_description_response(c
 	/* get the baseURL of the device */
 	if((baseURLNode = xmlnode_get_child(xmlRootNode, "URLBase")) != NULL) {
 		baseURL = xmlnode_get_data(baseURLNode);
-	} else {
+	}
+	/* fixes upnp-descriptions with empty urlbase-element */
+	if(baseURL == NULL){
 		baseURL = g_strdup(httpURL);
 	}
 



More information about the Commits mailing list