diff src/protocols/msn/state.c @ 10908:0317ad172e8d

[gaim-migrate @ 12640] Fix Fedora bug 149849 - Gaim's msn will fail to connect if you set it to "away" while connecting committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Mon, 09 May 2005 12:43:52 +0000
parents bcfea6c3d5c9
children c824e39db0e7
line wrap: on
line diff
--- a/src/protocols/msn/state.c	Sun May 08 16:15:11 2005 +0000
+++ b/src/protocols/msn/state.c	Mon May 09 12:43:52 2005 +0000
@@ -52,6 +52,13 @@
 	cmdproc = session->notification->cmdproc;
 	user = session->user;
 	state_text = msn_state_get_text(state);
+	session->state = state;
+
+	/* If we're not logged in yet, don't send the status to the server,
+	 * it will be sent when login completes
+	 */
+	if (!session->logged_in)
+		return;
 
 	msnobj = msn_user_get_object(user);
 
@@ -69,12 +76,6 @@
 		msn_cmdproc_send(cmdproc, "CHG", "%s %d %s", state_text,
 						 MSN_CLIENT_ID, gaim_url_encode(msnobj_str));
 
-		/*
-		 * We need to set this just in case someone tries to set icon
-		 * quickly on us - Justin
-		 */
-		session->state = state;
-
 		g_free(msnobj_str);
 	}
 }