Mercurial > pidgin
changeset 24517:2b4c909b40c4
Print a specific error to debug log about EmailDomainIsFederated error.
Probably won't need this once we properly add federated contacts.
References #6755.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Sun, 07 Dec 2008 07:04:23 +0000 |
parents | ff275531cbf2 |
children | 4fd22591e3f0 |
files | libpurple/protocols/msn/contact.c |
diffstat | 1 files changed, 18 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/msn/contact.c Mon Dec 01 05:53:40 2008 +0000 +++ b/libpurple/protocols/msn/contact.c Sun Dec 07 07:04:23 2008 +0000 @@ -946,15 +946,25 @@ MsnUser *user; xmlnode *guid; - char *fault_str; + xmlnode *fault; - /* We don't know how to respond to this faultcode, so log it */ - fault_str = xmlnode_to_str(xmlnode_get_child(resp->xml, "Body/Fault"), NULL); - if (fault_str != NULL) { - purple_debug_error("msn", "Operation {%s} Failed, SOAP Fault was: %s\n", - msn_contact_operation_str(state->action), fault_str); - g_free(fault_str); - return; + fault = xmlnode_get_child(resp->xml, "Body/Fault"); + if (fault != NULL) { + char *errorcode = xmlnode_get_data(xmlnode_get_child(fault, "detail/errorcode")); + char *fault_str; + if (errorcode && !strcmp(errorcode, "EmailDomainIsFederated")) { + /* Do something special! */ + purple_debug_error("msn", "Contact is from a federated domain, but don't know what to do yet!\n"); + } + + /* We don't know how to respond to this faultcode, so log it */ + fault_str = xmlnode_to_str(fault, NULL); + if (fault_str != NULL) { + purple_debug_error("msn", "Operation {%s} Failed, SOAP Fault was: %s\n", + msn_contact_operation_str(state->action), fault_str); + g_free(fault_str); + return; + } } g_return_if_fail(session != NULL);