# HG changeset patch # User Elliott Sales de Andrade # Date 1228633463 0 # Node ID 2b4c909b40c49a8af0bd405a3623a1061c8d32e6 # Parent ff275531cbf2440ddfc15cdcacd0f440692605a8 Print a specific error to debug log about EmailDomainIsFederated error. Probably won't need this once we properly add federated contacts. References #6755. diff -r ff275531cbf2 -r 2b4c909b40c4 libpurple/protocols/msn/contact.c --- 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);