changeset 30502:7a145934132f

Cancel ongoing Google relay request when signing out
author Marcus Lundblad <ml@update.uu.se>
date Sun, 27 Sep 2009 20:04:44 +0000
parents bcf1e4fe2a89
children a7e16735b218
files libpurple/protocols/jabber/google.c libpurple/protocols/jabber/jabber.c
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/google.c	Sat Sep 26 11:21:13 2009 +0000
+++ b/libpurple/protocols/jabber/google.c	Sun Sep 27 20:04:44 2009 +0000
@@ -545,7 +545,9 @@
 	GList *video_codecs = NULL;
 	GList *codecs = NULL;
 	JabberIq *result;
-	
+
+	js->google_relay_request = NULL;
+
 	if (url_text && len > 0) {
 		purple_debug_info("jabber", "got Google relay request response:\n%s\n",
 			url_text);
--- a/libpurple/protocols/jabber/jabber.c	Sat Sep 26 11:21:13 2009 +0000
+++ b/libpurple/protocols/jabber/jabber.c	Sun Sep 27 20:04:44 2009 +0000
@@ -1569,6 +1569,10 @@
 	/* remove Google relay-related stuff */
 	g_free(js->google_relay_token);
 	g_free(js->google_relay_host);
+	if (js->google_relay_request) {
+		purple_util_fetch_url_cancel(js->google_relay_request);
+		js->google_relay_request = NULL;
+	}
 
 	if (js->google_relay_request != NULL) {
 		purple_util_fetch_url_cancel(js->google_relay_request);