diff plugins/msn/msn.c @ 1864:5cb89cf24f45

[gaim-migrate @ 1874] hi there committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Sun, 20 May 2001 02:10:34 +0000
parents 97a097e00139
children 466fc4ada7cb
line wrap: on
line diff
--- 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;