src/protocols/msn/msn.c

changeset 11028
b3568dd036a9
parent 10914
b36341f695d6
child 11033
dc68e074f10d
--- a/src/protocols/msn/msn.c	Sat Jun 25 17:58:42 2005 +0000
+++ b/src/protocols/msn/msn.c	Sat Jun 25 18:18:24 2005 +0000
@@ -827,14 +827,18 @@
 
 	gc = gaim_account_get_connection(account);
 
-	if (gc) 
+	if (gc != NULL)
 		session = gc->proto_data;
 
 	state = gaim_status_get_id(status);
 
 	gaim_debug_info("msn", "Set status to %s\n", gaim_status_get_name(status));
 
-	if (strcmp(state, "offline") && !gc) {
+	if (!strcmp(state, "offline") && (gc != NULL)) {
+		gaim_account_disconnect(account);
+		return;
+	}
+	else if (strcmp(state, "offline") && (gc == NULL)) {
 		gaim_account_connect(account);
 		return;
 	}

mercurial