changeset 24719:39bd04a550a4

Actually that last change did break regular login, but I don't feel like disapproving a disapproval of a disapproval of a revision. This should fix it though. References #6196.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Mon, 15 Dec 2008 04:34:24 +0000
parents 9d13030adae8
children cf626850031f
files libpurple/protocols/msn/session.c
diffstat 1 files changed, 14 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/session.c	Mon Dec 15 04:03:12 2008 +0000
+++ b/libpurple/protocols/msn/session.c	Mon Dec 15 04:34:24 2008 +0000
@@ -448,25 +448,23 @@
 	PurpleConnection *gc;
 	PurpleStoredImage *img;
 
-	msn_change_status(session);
-
-	if (session->logged_in)
-		return;
-
-	account = session->account;
-	gc = purple_account_get_connection(account);
+	if (!session->logged_in) {
+		account = session->account;
+		gc = purple_account_get_connection(account);
 
-	img = purple_buddy_icons_find_account_icon(session->account);
-	/* TODO: Do we really want to call this if img is NULL? */
-	msn_user_set_buddy_icon(session->user, img);
-	if (img != NULL)
-		purple_imgstore_unref(img);
+		img = purple_buddy_icons_find_account_icon(session->account);
+		/* TODO: Do we really want to call this if img is NULL? */
+		msn_user_set_buddy_icon(session->user, img);
+		if (img != NULL)
+			purple_imgstore_unref(img);
 
-	session->logged_in = TRUE;
+		session->logged_in = TRUE;
+		purple_connection_set_state(gc, PURPLE_CONNECTED);
 
-	purple_connection_set_state(gc, PURPLE_CONNECTED);
+		/* Sync users */
+		msn_session_sync_users(session);
+	}
 
-	/* Sync users */
-	msn_session_sync_users(session);
+	msn_change_status(session);
 }