changeset 24723:cf626850031f

merge of '3b87c3b008c11c068a42eba55b3f5724cdac4ad4' and '5255dae1217b713f7cdd700364fa47efe0a98560'
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Mon, 15 Dec 2008 04:35:27 +0000
parents 041bb386bf96 (current diff) 39bd04a550a4 (diff)
children 6d57674c5fe3 25667ca518d6
files
diffstat 1 files changed, 14 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/session.c	Mon Dec 15 04:25:00 2008 +0000
+++ b/libpurple/protocols/msn/session.c	Mon Dec 15 04:35:27 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);
 }