/pidgin/main: d79e18b1b043: Fix UPNP mapping on some weird route...

unknown at rock.pidgin.im unknown at rock.pidgin.im
Sat Dec 1 14:27:54 EST 2012


Changeset: d79e18b1b0433d2def08db9ed5b16d72eea5f4d6
Author:	 Ferdinand Stehle <unknown>
Date:	 2012-12-01 14:27 -0500
Branch:	 release-2.x.y
URL: http://hg.pidgin.im/pidgin/main/rev/d79e18b1b043

Description:

Fix UPNP mapping on some weird routers.  Fixes #15373.

diffstat:

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

diffs (37 lines):

diff --git a/COPYRIGHT b/COPYRIGHT
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -511,6 +511,7 @@ Chris Stafford
 Kevin Stange
 Joshua Stein
 Jakub Steiner
+Ferdinand Stehle
 Richard Stellingwerff
 Charlie Stockman
 David Stoddard
diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,8 @@ version 2.10.7:
 	libpurple:
 	* Don't link directly to libgcrypt when building with GnuTLS support.
 	  (Bartosz Brachaczek) (#15329)
+	* Fix UPNP mappings on routers that return empty <URLBase/> elements
+	  in their response. (Ferdinand Stehle) (#15373)
 
 	Pidgin:
 	* Make Pidgin more friendly to non-X11 GTK+, such as MacPorts' +no_x11
diff --git a/libpurple/upnp.c b/libpurple/upnp.c
--- a/libpurple/upnp.c
+++ b/libpurple/upnp.c
@@ -258,7 +258,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