# HG changeset patch # User Mark Doliner # Date 1313044607 0 # Node ID 257b013533343ce439b731a05266839cbbffa2c1 # Parent 4151dad5bd00cbe5dea469d733a6f4e7257febf1# Parent c164dcad5e28ddf1f0f7b3cf84de7f2a1bdc0ff1 merge of '56ec802a4201a596a1bf852cae8f08819ca6bedc' and 'f1442997e656d73d0aad5c9daf3de27983b7cc1b' diff -r 4151dad5bd00 -r 257b01353334 libpurple/protocols/msn/contact.c --- a/libpurple/protocols/msn/contact.c Mon Aug 08 03:52:25 2011 +0000 +++ b/libpurple/protocols/msn/contact.c Thu Aug 11 06:36:47 2011 +0000 @@ -474,7 +474,7 @@ } /*parse contact list*/ -static void +static gboolean msn_parse_contact_list(MsnSession *session, xmlnode *node) { xmlnode *fault, *faultnode; @@ -499,13 +499,14 @@ if (g_str_equal(errorcode, "ABDoesNotExist")) { msn_create_address_book(session); g_free(errorcode); - return; + return FALSE; } g_free(errorcode); } msn_get_contact_list(session, MSN_PS_INITIAL, NULL); + return FALSE; } else { xmlnode *service; @@ -514,6 +515,7 @@ service; service = xmlnode_get_next_twin(service)) { msn_parse_each_service(session, service); } + return TRUE; } } @@ -534,23 +536,24 @@ purple_debug_misc("msn", "Got the contact list!\n"); - msn_parse_contact_list(session, resp->xml); + if (msn_parse_contact_list(session, resp->xml)) { #ifdef MSN_PARTIAL_LISTS - abLastChange = purple_account_get_string(session->account, - "ablastChange", NULL); - dynamicItemLastChange = purple_account_get_string(session->account, - "DynamicItemLastChanged", NULL); + abLastChange = purple_account_get_string(session->account, + "ablastChange", NULL); + dynamicItemLastChange = purple_account_get_string(session->account, + "DynamicItemLastChanged", NULL); #endif - if (state->partner_scenario == MSN_PS_INITIAL) { + if (state->partner_scenario == MSN_PS_INITIAL) { #ifdef MSN_PARTIAL_LISTS - /* XXX: this should be enabled when we can correctly do partial - syncs with the server. Currently we need to retrieve the whole - list to detect sync issues */ - msn_get_address_book(session, MSN_PS_INITIAL, abLastChange, dynamicItemLastChange); + /* XXX: this should be enabled when we can correctly do partial + syncs with the server. Currently we need to retrieve the whole + list to detect sync issues */ + msn_get_address_book(session, MSN_PS_INITIAL, abLastChange, dynamicItemLastChange); #else - msn_get_address_book(session, MSN_PS_INITIAL, NULL, NULL); + msn_get_address_book(session, MSN_PS_INITIAL, NULL, NULL); #endif + } } } } diff -r 4151dad5bd00 -r 257b01353334 libpurple/protocols/msn/session.c --- a/libpurple/protocols/msn/session.c Mon Aug 08 03:52:25 2011 +0000 +++ b/libpurple/protocols/msn/session.c Thu Aug 11 06:36:47 2011 +0000 @@ -288,6 +288,8 @@ msn_session_activate_login_timeout(MsnSession *session) { if (!session->logged_in && session->connected) { + if (session->login_timeout) + purple_timeout_remove(session->login_timeout); session->login_timeout = purple_timeout_add_seconds(MSN_LOGIN_FQY_TIMEOUT, msn_login_timeout_cb, session);