[gaim-migrate @ 8966]

Thu, 12 Feb 2004 19:17:54 +0000

author
Daniel Atallah <datallah@pidgin.im>
date
Thu, 12 Feb 2004 19:17:54 +0000
changeset 8243
e40bd494b78e
parent 8242
e90619756c91
child 8244
014ff38feea9

[gaim-migrate @ 8966]
a yahoo patch from Daniel (datallah) Atallah that i wish we didn't need,
and another:

"When the auto-reconnect plugin is unloaded, it doesn't
unregister the "signed-off" account event listener,
causing it to continue to try to reconnect you even if
it isn't loaded. This unregisters the listener when the
plugin is unloaded and also prevents any pending
reconnect events from being attempted when the timeout
fires."

committer: Luke Schierer <lschiere@pidgin.im>

plugins/autorecon.c file | annotate | diff | comparison | revisions
src/protocols/yahoo/yahoo.c file | annotate | diff | comparison | revisions
--- a/plugins/autorecon.c	Thu Feb 12 19:13:55 2004 +0000
+++ b/plugins/autorecon.c	Thu Feb 12 19:17:54 2004 +0000
@@ -18,6 +18,8 @@
 static GHashTable *hash = NULL;
 
 static gboolean do_signon(gpointer data) {
+	g_return_val_if_fail(hash != NULL, FALSE);
+       	
 	GaimAccount *account = data;
 	GaimAutoRecon *info;
 
@@ -85,6 +87,9 @@
 static gboolean
 plugin_unload(GaimPlugin *plugin)
 {
+	gaim_signal_disconnect(gaim_connections_get_handle(), "signed-off",
+			plugin, GAIM_CALLBACK(reconnect));
+	
 	g_hash_table_destroy(hash);
 	hash = NULL;
 
--- a/src/protocols/yahoo/yahoo.c	Thu Feb 12 19:13:55 2004 +0000
+++ b/src/protocols/yahoo/yahoo.c	Thu Feb 12 19:17:54 2004 +0000
@@ -1917,7 +1917,7 @@
 	GaimConnection *gc = data;
 	GaimAccount *account = gaim_connection_get_account(gc);
 	struct yahoo_data *yd = gc->proto_data;
-	char buf[1024], *i = buf;
+	char buf[2048], *i = buf;
 	int len;
 	GString *s;
 
@@ -1933,7 +1933,7 @@
 
 	while ((i = strstr(i, "Set-Cookie: "))) {
 		i += strlen("Set-Cookie: ");
-		for (;*i != ';'; i++)
+		for (;*i != ';' && *i != '\0'; i++)
 			g_string_append_c(s, *i);
 
 		g_string_append(s, "; ");

mercurial