pidgin: a133dc6e: Restore status on login on GG, rather th...

resiak at pidgin.im resiak at pidgin.im
Thu May 29 08:31:28 EDT 2008


-----------------------------------------------------------------
Revision: a133dc6e34c92757212fea830927cef838ea6b8c
Ancestor: 2a326fb6a140303965934d427b6e623951a7e408
Author: resiak at pidgin.im
Date: 2008-05-29T12:23:51
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/a133dc6e34c92757212fea830927cef838ea6b8c

Modified files:
        libpurple/protocols/gg/gg.c

ChangeLog: 

Restore status on login on GG, rather than setting Available first.
The rest of a patch by Adam "OnO" Strzelecki; references #5693.
Fixes #5137.

-------------- next part --------------
============================================================
--- libpurple/protocols/gg/gg.c	b2434eb3d6e862d886c723477e2da5b0ec86d01a
+++ libpurple/protocols/gg/gg.c	f66c4b548f16d7c875ee13b5a33ff937ddb27a2c
@@ -1491,23 +1491,12 @@ static void ggp_async_login_handler(gpoi
 			break;
 		case GG_EVENT_CONN_SUCCESS:
 			{
-				PurpleAccount *account;
-				PurplePresence *presence;
-				PurpleStatus *status;
-
 				purple_debug_info("gg", "GG_EVENT_CONN_SUCCESS\n");
 				purple_input_remove(gc->inpa);
 				gc->inpa = purple_input_add(info->session->fd,
 							  PURPLE_INPUT_READ,
 							  ggp_callback_recv, gc);
 
-				/* gg_change_status(info->session, GG_STATUS_AVAIL); */
-
-				account = purple_connection_get_account(gc);
-				presence = purple_account_get_presence(account);
-				status = purple_presence_get_active_status(presence);
-
-				ggp_set_status(account, status);
 				purple_connection_set_state(gc, PURPLE_CONNECTED);
 				ggp_buddylist_send(gc);
 			}
@@ -1695,6 +1684,8 @@ static void ggp_login(PurpleAccount *acc
 static void ggp_login(PurpleAccount *account)
 {
 	PurpleConnection *gc;
+	PurplePresence *presence;
+	PurpleStatus *status;
 	struct gg_login_params *glp;
 	GGPInfo *info;
 
@@ -1717,8 +1708,11 @@ static void ggp_login(PurpleAccount *acc
 	glp->uin = ggp_get_uin(account);
 	glp->password = (char *)purple_account_get_password(account);
 
+	presence = purple_account_get_presence(account);
+	status = purple_presence_get_active_status(presence);
+
 	glp->async = 1;
-	glp->status = GG_STATUS_AVAIL;
+	glp->status = ggp_to_gg_status(status, &glp->status_descr);
 	glp->tls = 0;
 
 	info->session = gg_login(glp);


More information about the Commits mailing list