comparison libpurple/protocols/msn/contact.c @ 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
comparison
equal deleted inserted replaced
24516:ff275531cbf2 24517:2b4c909b40c4
944 944
945 MsnUserList *userlist; 945 MsnUserList *userlist;
946 MsnUser *user; 946 MsnUser *user;
947 xmlnode *guid; 947 xmlnode *guid;
948 948
949 char *fault_str; 949 xmlnode *fault;
950 950
951 /* We don't know how to respond to this faultcode, so log it */ 951 fault = xmlnode_get_child(resp->xml, "Body/Fault");
952 fault_str = xmlnode_to_str(xmlnode_get_child(resp->xml, "Body/Fault"), NULL); 952 if (fault != NULL) {
953 if (fault_str != NULL) { 953 char *errorcode = xmlnode_get_data(xmlnode_get_child(fault, "detail/errorcode"));
954 purple_debug_error("msn", "Operation {%s} Failed, SOAP Fault was: %s\n", 954 char *fault_str;
955 msn_contact_operation_str(state->action), fault_str); 955 if (errorcode && !strcmp(errorcode, "EmailDomainIsFederated")) {
956 g_free(fault_str); 956 /* Do something special! */
957 return; 957 purple_debug_error("msn", "Contact is from a federated domain, but don't know what to do yet!\n");
958 }
959
960 /* We don't know how to respond to this faultcode, so log it */
961 fault_str = xmlnode_to_str(fault, NULL);
962 if (fault_str != NULL) {
963 purple_debug_error("msn", "Operation {%s} Failed, SOAP Fault was: %s\n",
964 msn_contact_operation_str(state->action), fault_str);
965 g_free(fault_str);
966 return;
967 }
958 } 968 }
959 969
960 g_return_if_fail(session != NULL); 970 g_return_if_fail(session != NULL);
961 971
962 userlist = session->userlist; 972 userlist = session->userlist;