# HG changeset patch # User Luke Schierer # Date 1076613474 0 # Node ID 217643616a74076a50deb42d0a63e9e4f4dda1e3 # Parent 1c06cadec61a3cf676f175df49a46a7c7f143e0f [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: Tailor Script diff -r 1c06cadec61a -r 217643616a74 plugins/autorecon.c --- 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; diff -r 1c06cadec61a -r 217643616a74 src/protocols/yahoo/yahoo.c --- 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, "; ");