cpw.malu.xmpp.google_relay: f3104b6e: Cancel ongoing Google relay request when...

malu at pidgin.im malu at pidgin.im
Sun Sep 27 16:11:15 EDT 2009


-----------------------------------------------------------------
Revision: f3104b6ee63e5ad78c9f7cbdeab49818bff9ab26
Ancestor: dcff5d130eccc3469a05dd3327b68fe6d790513a
Author: malu at pidgin.im
Date: 2009-09-27T20:04:44
Branch: im.pidgin.cpw.malu.xmpp.google_relay
URL: http://d.pidgin.im/viewmtn/revision/info/f3104b6ee63e5ad78c9f7cbdeab49818bff9ab26

Modified files:
        libpurple/protocols/jabber/google.c
        libpurple/protocols/jabber/jabber.c

ChangeLog: 

Cancel ongoing Google relay request when signing out

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/google.c	3dab8dcd736a2269657463744ee997db476bb99b
+++ libpurple/protocols/jabber/google.c	b0a4efa8e118e66d32fe1e34e3daa354c7f0b68e
@@ -545,7 +545,9 @@ jabber_google_relay_response_session_han
 	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);
============================================================
--- libpurple/protocols/jabber/jabber.c	daa54ce6873c4a45b31ac5ab04b73c7cc4d295a8
+++ libpurple/protocols/jabber/jabber.c	0925ce4120fa0b6d563f556122f4d256b7b36249
@@ -1569,6 +1569,10 @@ void jabber_close(PurpleConnection *gc)
 	/* 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);


More information about the Commits mailing list