pidgin: 8a218277: Don't request the AB if getting the cont...
qulogic at pidgin.im
qulogic at pidgin.im
Mon Aug 8 17:51:02 EDT 2011
----------------------------------------------------------------------
Revision: 8a2182773e8151d0913a9f39bdf5e6207302da0e
Parent: bb53d1e9201138b79a1eef0d4a7cda1fc852c59f
Author: qulogic at pidgin.im
Date: 08/08/11 17:43:19
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/8a2182773e8151d0913a9f39bdf5e6207302da0e
Changelog:
Don't request the AB if getting the contact list failed. Either there's
no AB, so it'll be created first, or a partial update failed, and the
contact list will be requested again.
Changes against parent bb53d1e9201138b79a1eef0d4a7cda1fc852c59f
patched libpurple/protocols/msn/contact.c
-------------- next part --------------
============================================================
--- libpurple/protocols/msn/contact.c 6313dee0bc04d37c5e04d99c036c8fb03921daaf
+++ libpurple/protocols/msn/contact.c b4c18ff4aab916791e4dbd4f2424f0a9d6dfac2f
@@ -474,7 +474,7 @@ msn_parse_each_service(MsnSession *sessi
}
/*parse contact list*/
-static void
+static gboolean
msn_parse_contact_list(MsnSession *session, xmlnode *node)
{
xmlnode *fault, *faultnode;
@@ -499,13 +499,14 @@ msn_parse_contact_list(MsnSession *sessi
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 @@ msn_parse_contact_list(MsnSession *sessi
service; service = xmlnode_get_next_twin(service)) {
msn_parse_each_service(session, service);
}
+ return TRUE;
}
}
@@ -534,23 +536,24 @@ msn_get_contact_list_cb(MsnSoapMessage *
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
+ }
}
}
}
More information about the Commits
mailing list