# HG changeset patch # User Eric Warmenhoven # Date 990324634 0 # Node ID 5cb89cf24f4509b07067e5c3fa361bbefb7f9dce # Parent bf2434d36e541a15646e9ad5d98a45a0e0c24cd2 [gaim-migrate @ 1874] hi there committer: Tailor Script diff -r bf2434d36e54 -r 5cb89cf24f45 plugins/irc.c --- a/plugins/irc.c Sun May 20 00:01:55 2001 +0000 +++ b/plugins/irc.c Sun May 20 02:10:34 2001 +0000 @@ -36,6 +36,7 @@ #include #include #include +#include #include "multi.h" #include "prpl.h" #include "gaim.h" @@ -1862,7 +1863,7 @@ atoi(user->proto_opt[USEROPT_PROXYTYPE]), user->proto_opt[USEROPT_USER], user->proto_opt[USEROPT_PASS], irc_login_callback, gc); - if (idata->fd < 0) { + if (user->gc && (idata->fd < 0)) { hide_login_progress(gc, "Unable to create socket"); signoff(gc); return; diff -r bf2434d36e54 -r 5cb89cf24f45 plugins/jabber/jabber.c --- a/plugins/jabber/jabber.c Sun May 20 00:01:55 2001 +0000 +++ b/plugins/jabber/jabber.c Sun May 20 02:10:34 2001 +0000 @@ -477,7 +477,7 @@ atoi(user->proto_opt[USEROPT_PROXYTYPE]), user->proto_opt[USEROPT_USER], user->proto_opt[USEROPT_PASS], gjab_connected, j); - if (j->fd < 0) { + if (user->gc && (j->fd < 0)) { STATE_EVT(JCONN_STATE_OFF) return; } @@ -913,6 +913,7 @@ buddyname = g_strdup_printf("%s@%s", who->user, who->server); if (strcasecmp(sub, "from") && strcasecmp(sub, "none") && !(b = find_buddy(GJ_GC(j), buddyname))) { + debug_printf("adding buddy: %s\n", buddyname); b = add_buddy(GJ_GC(j), "Buddies", buddyname, name ? name : Jid); do_export(GJ_GC(j)); } @@ -963,6 +964,12 @@ g_free(buddy); } +static gboolean jabber_disconnect(gpointer data) +{ + signoff(data); + return FALSE; +} + static void jabber_handleauthresp(gjconn j, jpacket p) { if (jpacket_subtype(p) == JPACKET__RESULT) { @@ -997,7 +1004,7 @@ hide_login_progress(GJ_GC(j), "Unknown login error"); } - signoff(GJ_GC(j)); + gtk_timeout_add(50, jabber_disconnect, GJ_GC(j)); } } diff -r bf2434d36e54 -r 5cb89cf24f45 plugins/msn/msn.c --- a/plugins/msn/msn.c Sun May 20 00:01:55 2001 +0000 +++ b/plugins/msn/msn.c Sun May 20 02:10:34 2001 +0000 @@ -476,13 +476,13 @@ res = g_strsplit(buf, " ", 0); - // Kill the old one + /* Kill the old one */ g_free(md->friendly); - // Set the new one + /* Set the new one */ md->friendly = g_strdup(res[4]); - // And free up some memory. That's all, folks. + /* And free up some memory. That's all, folks. */ g_strfreev(res); } else if (!strncmp("BYE ", buf, 4)) { char **res; @@ -552,6 +552,7 @@ gchar **address; gchar **res; struct msn_conn *mc = g_new0(struct msn_conn, 1); + struct aim_user *user = gc->user; mc->gc = gc; res = g_strsplit(buf, " ", 0); @@ -570,7 +571,7 @@ msn_answer_callback, mc); g_strfreev(address); g_strfreev(res); - if (mc->fd < 0) { + if (user->gc && (mc->fd < 0)) { /* Looks like we had an error connecting. */ g_free(mc->session); g_free(mc->secret); @@ -785,6 +786,7 @@ return; } else if (!strncmp("XFR ", buf, 4)) { char **res; + struct aim_user *user = gc->user; res = g_strsplit(buf, " ", 0); @@ -811,7 +813,7 @@ atoi(gc->user->proto_opt[USEROPT_PROXYTYPE]), gc->user->proto_opt[USEROPT_USER], gc->user->proto_opt[USEROPT_PASS], msn_login_callback, gc); - if (md->fd < 0) { + if (user->gc && (md->fd < 0)) { g_strfreev(res); hide_login_progress(gc, "Error connecting to server"); signoff(gc); @@ -917,7 +919,7 @@ atoi(user->proto_opt[USEROPT_PROXYTYPE]), user->proto_opt[USEROPT_USER], user->proto_opt[USEROPT_PASS], msn_login_callback, gc); - if (md->fd < 0) { + if (user->gc && (md->fd < 0)) { hide_login_progress(gc, "Error connecting to server"); signoff(gc); return; diff -r bf2434d36e54 -r 5cb89cf24f45 src/conversation.c --- a/src/conversation.c Sun May 20 00:01:55 2001 +0000 +++ b/src/conversation.c Sun May 20 02:10:34 2001 +0000 @@ -1286,7 +1286,6 @@ char *str; FILE *fd; char colour[10]; - int colorv = -1; char *clr; struct buddy *b; int gtk_font_options = 0; @@ -1381,10 +1380,6 @@ } } else { - if ((clr = strstr(what, "proto_opt[USEROPT_USER], user->proto_opt[USEROPT_PASS], toc_login_callback, gc); - if (tdt->toc_fd < 0) { + if (user->gc && (tdt->toc_fd < 0)) { g_snprintf(buf, sizeof(buf), "Connect to %s failed", user->proto_opt[USEROPT_AUTH]); hide_login_progress(gc, buf); signoff(gc);