changeset 28041:3a6b755da669

merge of '48f2d27edd8466883a732524bff0e292e343e6f5' and 'ae5a2cd1da029523f7d734738a879d06c2178a4b'
author Paul Aurich <paul@darkrain42.org>
date Fri, 21 Aug 2009 20:49:06 +0000
parents 10540cd46121 (current diff) ed30bc20442c (diff)
children 33e8d40ae6ec 8c991e09efcb
files
diffstat 2 files changed, 15 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/caps.c	Fri Aug 21 15:57:38 2009 +0000
+++ b/libpurple/protocols/jabber/caps.c	Fri Aug 21 20:49:06 2009 +0000
@@ -468,8 +468,10 @@
 		}
 
 		if (!hash || strcmp(hash, userdata->ver)) {
-			purple_debug_warning("jabber", "Could not validate caps info from %s\n",
-			                     xmlnode_get_attrib(packet, "from"));
+			purple_debug_warning("jabber", "Could not validate caps info from "
+			                     "%s. Expected %s, got %s\n",
+			                     xmlnode_get_attrib(packet, "from"),
+			                     userdata->ver, hash ? hash : "(null)");
 
 			userdata->cb(NULL, NULL, userdata->cb_data);
 			jabber_caps_client_info_destroy(info);
--- a/libpurple/protocols/jabber/google.c	Fri Aug 21 15:57:38 2009 +0000
+++ b/libpurple/protocols/jabber/google.c	Fri Aug 21 20:49:06 2009 +0000
@@ -1316,6 +1316,7 @@
 		purple_debug_error("jabber", "Google STUN lookup failed: %s\n",
 			error_message);
 		g_slist_free(hosts);
+		js->stun_query = NULL;
 		return;
 	}
 
@@ -1334,18 +1335,16 @@
 			port = ntohs(((struct sockaddr_in *) addr)->sin_port);
 		}
 
-		if (js) {
-			if (js->stun_ip) {
-				g_free(js->stun_ip);
-			}
-			js->stun_ip = g_strdup(dst);
-			purple_debug_info("jabber", "set Google STUN IP address: %s\n", dst);
-			js->stun_port = port;
-			purple_debug_info("jabber", "set Google STUN port: %d\n", port);
-			purple_debug_info("jabber", "set Google STUN port: %d\n", port);
-			/* unmark ongoing query */
-			js->stun_query = NULL;
-		}
+		if (js->stun_ip)
+			g_free(js->stun_ip);
+		js->stun_ip = g_strdup(dst);
+		js->stun_port = port;
+
+		purple_debug_info("jabber", "set Google STUN IP/port address: "
+		                  "%s:%d\n", dst, port);
+
+		/* unmark ongoing query */
+		js->stun_query = NULL;
 	}
 
 	while (hosts != NULL) {