pidgin: 3d3089ef: Print a specific error to debug log abou...
qulogic at pidgin.im
qulogic at pidgin.im
Wed Dec 10 01:55:55 EST 2008
-----------------------------------------------------------------
Revision: 3d3089efbe3365e276ce3e966aa88e4925f76c1c
Ancestor: adc3176c376f3dfd332101e7c3da956646c3331d
Author: qulogic at pidgin.im
Date: 2008-12-07T07:04:23
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/3d3089efbe3365e276ce3e966aa88e4925f76c1c
Modified files:
libpurple/protocols/msn/contact.c
ChangeLog:
Print a specific error to debug log about EmailDomainIsFederated error.
Probably won't need this once we properly add federated contacts.
References #6755.
Comments:
References #3322.
-------------- next part --------------
============================================================
--- libpurple/protocols/msn/contact.c 584d94d53431ccc90ca22ae1df807af2b8f3a8a0
+++ libpurple/protocols/msn/contact.c 78c3c67ef593c4c309c7729f49df7f947d509f78
@@ -946,15 +946,25 @@ msn_add_contact_read_cb(MsnSoapMessage *
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);
More information about the Commits
mailing list