cpw.qulogic.msn: 67ca4287: The great MSN debug message cleanup! Thr...
qulogic at pidgin.im
qulogic at pidgin.im
Sat Jul 12 03:36:13 EDT 2008
-----------------------------------------------------------------
Revision: 67ca4287c39e084b96718b0e1768578954ac66a5
Ancestor: e0c15c710af77a687e1adb624fdf03917bfef2fe
Author: qulogic at pidgin.im
Date: 2008-07-12T04:42:24
Branch: im.pidgin.cpw.qulogic.msn
URL: http://d.pidgin.im/viewmtn/revision/info/67ca4287c39e084b96718b0e1768578954ac66a5
Modified files:
libpurple/protocols/msn/contact.c
libpurple/protocols/msn/msn.c
libpurple/protocols/msn/msnutils.c
libpurple/protocols/msn/nexus.c
libpurple/protocols/msn/notification.c
libpurple/protocols/msn/oim.c
libpurple/protocols/msn/state.c
libpurple/protocols/msn/switchboard.c
libpurple/protocols/msn/user.c
libpurple/protocols/msn/userlist.c
ChangeLog:
The great MSN debug message cleanup! Threw in a few whitespace fixes,
too, as I saw them. Nothing to see here, move along...
-------------- next part --------------
============================================================
--- libpurple/protocols/msn/contact.c b13174a983fe12ca067f85e0d7516540bd53f660
+++ libpurple/protocols/msn/contact.c bc9b58278d97d62a0c16bd6bd76fb4d8d79b1486
@@ -203,10 +203,10 @@ msn_create_address_cb(MsnSoapMessage *re
msn_create_address_cb(MsnSoapMessage *req, MsnSoapMessage *resp, gpointer data)
{
if (resp && xmlnode_get_child(resp->xml, "Body/Fault") == NULL) {
- purple_debug_info("msnab", "Address Book successfully created!\n");
+ purple_debug_info("msn", "Address Book successfully created!\n");
msn_get_address_book((MsnSession *)data, MSN_PS_INITIAL, NULL, NULL);
} else {
- purple_debug_info("msnab", "Address Book creation failed!\n");
+ purple_debug_info("msn", "Address Book creation failed!\n");
}
}
@@ -219,7 +219,7 @@ msn_create_address_book(MsnSession *sess
g_return_if_fail(session->user != NULL);
g_return_if_fail(session->user->passport != NULL);
- purple_debug_info("msnab","Creating an Address Book.\n");
+ purple_debug_info("msn", "Creating an Address Book.\n");
body = g_markup_printf_escaped(MSN_ADD_ADDRESSBOOK_TEMPLATE,
msn_nexus_get_token_str(session->nexus, MSN_AUTH_CONTACTS),
@@ -243,7 +243,7 @@ msn_parse_each_member(MsnSession *sessio
char *member_id = xmlnode_get_data(xmlnode_get_child(member, "MembershipId"));
MsnUser *user = msn_userlist_find_add_user(session->userlist, passport, NULL);
- purple_debug_info("msncl","%s name: %s, Type: %s, MembershipID: %s\n",
+ purple_debug_info("msn", "CL: %s name: %s, Type: %s, MembershipID: %s\n",
node, passport, type, member_id == NULL ? "(null)" : member_id);
if (member_id) {
@@ -272,7 +272,7 @@ msn_parse_each_service(MsnSession *sessi
char *lastchange_str = xmlnode_get_data(lastchange);
xmlnode *membership;
- purple_debug_info("msncl","last change: %s\n", lastchange_str);
+ purple_debug_info("msn", "CL last change: %s\n", lastchange_str);
purple_account_set_string(session->account, "CLLastChange",
lastchange_str);
@@ -285,7 +285,7 @@ msn_parse_each_service(MsnSession *sessi
MsnListId list = msn_get_memberrole(role_str);
xmlnode *member;
- purple_debug_info("msncl", "MemberRole role: %s, list: %d\n",
+ purple_debug_info("msn", "CL MemberRole role: %s, list: %d\n",
role_str, list);
for (member = xmlnode_get_child(membership, "Members/Member");
@@ -327,7 +327,7 @@ msn_parse_contact_list(MsnSession *sessi
if ((fault = xmlnode_get_child(node, "Body/Fault"))) {
if ((faultnode = xmlnode_get_child(fault, "faultstring"))) {
char *faultstring = xmlnode_get_data(faultnode);
- purple_debug_info("msncl", "Retrieving contact list failed: %s\n",
+ purple_debug_info("msn", "Retrieving contact list failed: %s\n",
faultstring);
g_free(faultstring);
}
@@ -368,7 +368,7 @@ msn_get_contact_list_cb(MsnSoapMessage *
const char *abLastChange;
const char *dynamicItemLastChange;
- purple_debug_misc("msncl","Got the contact list!\n");
+ purple_debug_misc("msn", "Got the contact list!\n");
msn_parse_contact_list(session, resp->xml);
abLastChange = purple_account_get_string(session->account,
@@ -401,10 +401,10 @@ msn_get_contact_list(MsnSession *session
GetContactListCbData cb_data = { session, partner_scenario };
const gchar *partner_scenario_str = MsnSoapPartnerScenarioText[partner_scenario];
- purple_debug_misc("MSNCL","Getting Contact List.\n");
+ purple_debug_misc("msn", "Getting Contact List.\n");
- if ( update_time != NULL ) {
- purple_debug_info("MSNCL","Last update time: %s\n",update_time);
+ if (update_time != NULL) {
+ purple_debug_info("msn", "CL Last update time: %s\n", update_time);
update_str = g_strdup_printf(MSN_GET_CONTACT_UPDATE_XML,update_time);
}
@@ -427,7 +427,7 @@ msn_parse_addressbook_groups(MsnSession
{
xmlnode *group;
- purple_debug_info("MSNAB","msn_parse_addressbook_groups()\n");
+ purple_debug_info("msn", "msn_parse_addressbook_groups()\n");
for(group = xmlnode_get_child(node, "Group"); group;
group = xmlnode_get_next_twin(group)){
@@ -447,7 +447,7 @@ msn_parse_addressbook_groups(MsnSession
continue;
}
- purple_debug_info("MsnAB","group_id: %s, name: %s\n", group_id, group_name ? group_name : "(null)");
+ purple_debug_info("msn", "AB group_id: %s, name: %s\n", group_id, group_name ? group_name : "(null)");
if ((purple_find_group(group_name)) == NULL){
PurpleGroup *g = purple_group_new(group_name);
purple_blist_add_group(g, NULL);
@@ -552,7 +552,7 @@ msn_parse_addressbook_contacts(MsnSessio
}
/* ignore non-messenger contacts */
- if((messenger_user = xmlnode_get_child(contactInfo, "isMessengerUser"))) {
+ if ((messenger_user = xmlnode_get_child(contactInfo, "isMessengerUser"))) {
char *is_messenger_user = xmlnode_get_data(messenger_user);
if(is_messenger_user && !strcmp(is_messenger_user, "false")) {
@@ -577,7 +577,7 @@ msn_parse_addressbook_contacts(MsnSessio
/*TODO: need to support the Mobile type*/
continue;
}
- for(contactEmailNode = xmlnode_get_child(emailsNode, "ContactEmail"); contactEmailNode;
+ for (contactEmailNode = xmlnode_get_child(emailsNode, "ContactEmail"); contactEmailNode;
contactEmailNode = xmlnode_get_next_twin(contactEmailNode) ){
if (!(messengerEnabledNode = xmlnode_get_child(contactEmailNode, "isMessengerEnabled"))) {
/* XXX: Should this be a continue instead of a break? It seems like it'd cause unpredictable results otherwise. */
@@ -591,15 +591,15 @@ msn_parse_addressbook_contacts(MsnSessio
passport = xmlnode_get_data(emailNode);
}
- if(msnEnabled && !strcmp(msnEnabled, "true")) {
+ if (msnEnabled && !strcmp(msnEnabled, "true")) {
/*Messenger enabled, Get the Passport*/
- purple_debug_info("MsnAB", "Yahoo User %s\n", passport ? passport : "(null)");
+ purple_debug_info("msn", "AB Yahoo User %s\n", passport ? passport : "(null)");
networkId = MSN_NETWORK_YAHOO;
g_free(msnEnabled);
break;
} else {
/*TODO maybe we can just ignore it in Purple?*/
- purple_debug_info("MSNAB", "Other type user\n");
+ purple_debug_info("msn", "AB Other type user\n");
}
g_free(msnEnabled);
@@ -627,7 +627,7 @@ msn_parse_addressbook_contacts(MsnSessio
mobile = msn_parse_addressbook_mobile(contactInfo, &mobile_number);
- purple_debug_misc("MsnAB","passport:{%s} uid:{%s} display:{%s} alias: {%s} mobile:{%s} mobile number:{%s}\n",
+ purple_debug_misc("msn", "AB passport:{%s} uid:{%s} display:{%s} alias: {%s} mobile:{%s} mobile number:{%s}\n",
passport, uid ? uid : "(null)", Name ? Name : "(null)", alias ? alias : "(null)",
mobile ? "true" : "false", mobile_number ? mobile_number : "(null)");
@@ -639,10 +639,10 @@ msn_parse_addressbook_contacts(MsnSessio
groupIds = xmlnode_get_child(contactInfo, "groupIds");
if (groupIds) {
for (guid = xmlnode_get_child(groupIds, "guid"); guid;
- guid = xmlnode_get_next_twin(guid)){
+ guid = xmlnode_get_next_twin(guid)) {
char *group_id = xmlnode_get_data(guid);
msn_user_add_group_id(user, group_id);
- purple_debug_misc("MsnAB", "guid:%s\n", group_id ? group_id : "(null)");
+ purple_debug_misc("msn", "AB guid:%s\n", group_id ? group_id : "(null)");
g_free(group_id);
}
} else {
@@ -653,7 +653,7 @@ msn_parse_addressbook_contacts(MsnSessio
msn_got_lst_user(session, user, MSN_LIST_FL_OP, NULL);
- if(mobile && user)
+ if (mobile && user)
{
user->mobile = TRUE;
purple_prpl_got_user_status(session->account, user->passport, "mobile", NULL);
@@ -684,14 +684,14 @@ msn_parse_addressbook(MsnSession *sessio
if ((faultnode = xmlnode_get_child(fault, "faultstring"))) {
gchar *faultstring = xmlnode_get_data(faultnode);
- purple_debug_info("MSNAB","Faultstring: %s\n", faultstring);
+ purple_debug_info("msn", "AB Faultstring: %s\n", faultstring);
g_free(faultstring);
}
if ((faultnode = xmlnode_get_child(fault, "detail/errorcode"))) {
gchar *errorcode = xmlnode_get_data(faultnode);
- purple_debug_info("MSNAB", "Error Code: %s\n", errorcode);
+ purple_debug_info("msn", "AB Error Code: %s\n", errorcode);
if (g_str_equal(errorcode, "ABDoesNotExist")) {
g_free(errorcode);
@@ -704,15 +704,15 @@ msn_parse_addressbook(MsnSession *sessio
}
result = xmlnode_get_child(node, "Body/ABFindAllResponse/ABFindAllResult");
- if(result == NULL){
- purple_debug_misc("MSNAB","receive no address book update\n");
+ if (result == NULL) {
+ purple_debug_misc("msn", "Received no address book update\n");
return TRUE;
}
/* I don't see this "groups" tag documented on msnpiki, need to find out
if they are really there, and update msnpiki */
/*Process Group List*/
- groups = xmlnode_get_child(result,"groups");
+ groups = xmlnode_get_child(result, "groups");
if (groups != NULL) {
msn_parse_addressbook_groups(session, groups);
}
@@ -720,7 +720,7 @@ msn_parse_addressbook(MsnSession *sessio
/*add a default No group to set up the no group Membership*/
msn_group_new(session->userlist, MSN_INDIVIDUALS_GROUP_ID,
MSN_INDIVIDUALS_GROUP_NAME);
- purple_debug_misc("MSNAB","group_id:%s name:%s\n",
+ purple_debug_misc("msn", "AB group_id:%s name:%s\n",
MSN_INDIVIDUALS_GROUP_ID, MSN_INDIVIDUALS_GROUP_NAME);
if ((purple_find_group(MSN_INDIVIDUALS_GROUP_NAME)) == NULL){
PurpleGroup *g = purple_group_new(MSN_INDIVIDUALS_GROUP_NAME);
@@ -729,33 +729,33 @@ msn_parse_addressbook(MsnSession *sessio
/*add a default No group to set up the no group Membership*/
msn_group_new(session->userlist, MSN_NON_IM_GROUP_ID, MSN_NON_IM_GROUP_NAME);
- purple_debug_misc("MSNAB","group_id:%s name:%s\n", MSN_NON_IM_GROUP_ID, MSN_NON_IM_GROUP_NAME);
- if ((purple_find_group(MSN_NON_IM_GROUP_NAME)) == NULL){
+ purple_debug_misc("msn", "AB group_id:%s name:%s\n", MSN_NON_IM_GROUP_ID, MSN_NON_IM_GROUP_NAME);
+ if ((purple_find_group(MSN_NON_IM_GROUP_NAME)) == NULL) {
PurpleGroup *g = purple_group_new(MSN_NON_IM_GROUP_NAME);
purple_blist_add_group(g, NULL);
}
/*Process contact List*/
- purple_debug_info("MSNAB","process contact list...\n");
- contacts =xmlnode_get_child(result,"contacts");
+ purple_debug_info("msn", "Process contact list...\n");
+ contacts = xmlnode_get_child(result, "contacts");
if (contacts != NULL) {
msn_parse_addressbook_contacts(session, contacts);
}
- abNode =xmlnode_get_child(result,"ab");
- if(abNode != NULL){
+ abNode = xmlnode_get_child(result, "ab");
+ if (abNode != NULL) {
xmlnode *node2;
char *tmp = NULL;
if ((node2 = xmlnode_get_child(abNode, "lastChange")))
tmp = xmlnode_get_data(node2);
- purple_debug_info("MSNAB"," lastchanged Time:{%s}\n", tmp ? tmp : "(null)");
+ purple_debug_info("msn", "AB lastchanged Time:{%s}\n", tmp ? tmp : "(null)");
purple_account_set_string(session->account, "ablastChange", tmp);
g_free(tmp); tmp = NULL;
if ((node2 = xmlnode_get_child(abNode, "DynamicItemLastChanged")))
tmp = xmlnode_get_data(node2);
- purple_debug_info("MsnAB"," DynamicItemLastChanged :{%s}\n", tmp ? tmp : "(null)");
+ purple_debug_info("msn", "AB DynamicItemLastChanged :{%s}\n", tmp ? tmp : "(null)");
purple_account_set_string(session->account, "DynamicItemLastChanged", tmp);
g_free(tmp);
}
@@ -773,7 +773,7 @@ msn_get_address_cb(MsnSoapMessage *req,
g_return_if_fail(session != NULL);
- purple_debug_misc("MSNAB", "Got the Address Book!\n");
+ purple_debug_misc("msn", "Got the Address Book!\n");
if (msn_parse_addressbook(session, resp->xml)) {
if (!session->logged_in) {
@@ -801,7 +801,7 @@ msn_get_address_book(MsnSession *session
{
char *body, *update_str = NULL;
- purple_debug_misc("MSNAB","Getting Address Book\n");
+ purple_debug_misc("msn", "Getting Address Book\n");
/*build SOAP and POST it*/
if (dynamicItemLastChange != NULL)
@@ -866,7 +866,7 @@ msn_contact_request_cb(MsnSoapMessage *r
char *faultcode_str;
if (resp == NULL) {
- purple_debug_error("MSNCL",
+ purple_debug_error("msn",
"Operation {%s} failed. No response received from server.\n",
msn_contact_operation_str(state->action));
return;
@@ -885,7 +885,7 @@ msn_contact_request_cb(MsnSoapMessage *r
faultcode_str = xmlnode_get_data(faultcode);
if (faultcode_str && g_str_equal(faultcode_str, "q0:BadContextToken")) {
- purple_debug_info("MSNCL",
+ purple_debug_info("msn",
"Contact Operation {%s} failed because of bad token."
" Updating token now and retrying operation.\n",
msn_contact_operation_str(state->action));
@@ -898,7 +898,7 @@ msn_contact_request_cb(MsnSoapMessage *r
/* We don't know how to respond to this faultcode, so just log it */
/* XXX: Probably should notify the user or undo the change or something? */
char *str = xmlnode_to_str(xmlnode_get_child(resp->xml, "Body/Fault"), NULL);
- purple_debug_error("MSNCL", "Operation {%s} Failed, SOAP Fault was: %s\n",
+ purple_debug_error("msn", "Operation {%s} Failed, SOAP Fault was: %s\n",
msn_contact_operation_str(state->action), str);
g_free(str);
msn_callback_state_free(state);
@@ -937,7 +937,7 @@ msn_add_contact_read_cb(MsnSoapMessage *
userlist = session->userlist;
- purple_debug_info("MSNCL","Contact added successfully\n");
+ purple_debug_info("msn", "Contact added successfully\n");
// the code this block is replacing didn't send ADL for yahoo contacts,
// but i haven't confirmed this is WLM's behaviour wrt yahoo contacts
@@ -971,7 +971,7 @@ msn_add_contact(MsnSession *session, Msn
contact_xml = g_strdup_printf(MSN_XML_ADD_CONTACT, escaped_displayname, passport);
#endif
- purple_debug_info("MSNCL","Adding contact %s to contact list\n", passport);
+ purple_debug_info("msn", "Adding contact %s to contact list\n", passport);
contact_xml = g_strdup_printf(MSN_CONTACT_XML, passport);
body = g_strdup_printf(MSN_ADD_CONTACT_TEMPLATE, contact_xml);
@@ -999,9 +999,9 @@ msn_add_contact_to_group_read_cb(MsnSoap
if (msn_userlist_add_buddy_to_group(userlist, state->who,
state->new_group_name)) {
- purple_debug_info("MSNCL", "Contact %s added to group %s successfully!\n", state->who, state->new_group_name);
+ purple_debug_info("msn", "Contact %s added to group %s successfully!\n", state->who, state->new_group_name);
} else {
- purple_debug_info("MSNCL","Contact %s added to group %s successfully on server, but failed in the local list\n", state->who, state->new_group_name);
+ purple_debug_info("msn", "Contact %s added to group %s successfully on server, but failed in the local list\n", state->who, state->new_group_name);
}
if (state->action & MSN_ADD_BUDDY) {
@@ -1056,12 +1056,12 @@ msn_add_contact_to_group(MsnSession *ses
return;
}
- purple_debug_info("MSNCL", "Adding user %s to group %s\n", passport,
+ purple_debug_info("msn", "Adding user %s to group %s\n", passport,
msn_userlist_find_group_name(userlist, groupId));
user = msn_userlist_find_user(userlist, passport);
if (user == NULL) {
- purple_debug_warning("MSNCL", "Unable to retrieve user %s from the userlist!\n", passport);
+ purple_debug_warning("msn", "Unable to retrieve user %s from the userlist!\n", passport);
msn_callback_state_free(state);
return; /* guess this never happened! */
}
@@ -1092,7 +1092,7 @@ msn_delete_contact_read_cb(MsnSoapMessag
MsnUserList *userlist = state->session->userlist;
MsnUser *user = msn_userlist_find_user_with_id(userlist, state->uid);
- purple_debug_info("MSNCL","Delete contact successful\n");
+ purple_debug_info("msn", "Delete contact successful\n");
if (user != NULL) {
msn_userlist_remove_user(userlist, user);
@@ -1114,7 +1114,7 @@ msn_delete_contact(MsnSession *session,
msn_callback_state_set_uid(state, contactId);
/* build SOAP request */
- purple_debug_info("MSNCL","Deleting contact with contactId: %s\n", contactId);
+ purple_debug_info("msn", "Deleting contact with contactId: %s\n", contactId);
body = g_strdup_printf(MSN_DEL_CONTACT_TEMPLATE, contact_id_xml);
state->body = xmlnode_from_str(body, -1);
@@ -1135,9 +1135,9 @@ msn_del_contact_from_group_read_cb(MsnSo
if (msn_userlist_rem_buddy_from_group(state->session->userlist,
state->who, state->old_group_name)) {
- purple_debug_info("MSNCL", "Contact %s deleted successfully from group %s\n", state->who, state->old_group_name);
+ purple_debug_info("msn", "Contact %s deleted successfully from group %s\n", state->who, state->old_group_name);
} else {
- purple_debug_info("MSNCL", "Contact %s deleted successfully from group %s in the server, but failed in the local list\n", state->who, state->old_group_name);
+ purple_debug_info("msn", "Contact %s deleted successfully from group %s in the server, but failed in the local list\n", state->who, state->old_group_name);
}
}
@@ -1158,16 +1158,16 @@ msn_del_contact_from_group(MsnSession *s
groupId = msn_userlist_find_group_id(userlist, group_name);
if (groupId != NULL) {
- purple_debug_info("MSNCL", "Deleting user %s from group %s\n", passport, group_name);
+ purple_debug_info("msn", "Deleting user %s from group %s\n", passport, group_name);
} else {
- purple_debug_warning("MSNCL", "Unable to retrieve group id from group %s !\n", group_name);
+ purple_debug_warning("msn", "Unable to retrieve group id from group %s !\n", group_name);
return;
}
user = msn_userlist_find_user(userlist, passport);
if (user == NULL) {
- purple_debug_warning("MSNCL", "Unable to retrieve user from passport %s!\n", passport);
+ purple_debug_warning("msn", "Unable to retrieve user from passport %s!\n", passport);
return;
}
@@ -1199,7 +1199,7 @@ msn_update_contact_read_cb(MsnSoapMessag
msn_update_contact_read_cb(MsnSoapMessage *req, MsnSoapMessage *resp,
gpointer data)
{
- purple_debug_info("MSN CL","Contact updated successfully\n");
+ purple_debug_info("msn", "Contact updated successfully\n");
}
/* Update a contact's info */
@@ -1211,9 +1211,9 @@ msn_update_contact(MsnSession *session,
xmlnode *contact_info;
xmlnode *changes;
- purple_debug_info("MSN CL","Update contact information with new %s: %s\n",
+ purple_debug_info("msn", "Update contact information with new %s: %s\n",
type==MSN_UPDATE_DISPLAY ? "display name" : "alias", value);
- purple_debug_info("msncl", "passport=%s\n", passport);
+ purple_debug_info("msn", "passport=%s\n", passport);
g_return_if_fail(passport != NULL);
contact_info = xmlnode_new("contactInfo");
changes = xmlnode_new("propertiesChanged");
@@ -1277,7 +1277,7 @@ msn_del_contact_from_list_read_cb(MsnSoa
MsnCallbackState *state = data;
MsnSession *session = state->session;
- purple_debug_info("MSN CL", "Contact %s deleted successfully from %s list on server!\n", state->who, MsnMemberRole[state->list_id]);
+ purple_debug_info("msn", "Contact %s deleted successfully from %s list on server!\n", state->who, MsnMemberRole[state->list_id]);
if (state->list_id == MSN_LIST_PL) {
MsnUser *user = msn_userlist_find_user(session->userlist, state->who);
@@ -1310,7 +1310,7 @@ msn_del_contact_from_list(MsnSession *se
g_return_if_fail(passport != NULL);
g_return_if_fail(list < 5);
- purple_debug_info("MSN CL", "Deleting contact %s from %s list\n", passport, MsnMemberRole[list]);
+ purple_debug_info("msn", "Deleting contact %s from %s list\n", passport, MsnMemberRole[list]);
if (state == NULL) {
state = msn_callback_state_new(session);
@@ -1355,7 +1355,7 @@ msn_add_contact_to_list_read_cb(MsnSoapM
g_return_if_fail(state != NULL);
g_return_if_fail(state->session != NULL);
- purple_debug_info("MSN CL", "Contact %s added successfully to %s list on server!\n", state->who, MsnMemberRole[state->list_id]);
+ purple_debug_info("msn", "Contact %s added successfully to %s list on server!\n", state->who, MsnMemberRole[state->list_id]);
if (state->list_id == MSN_LIST_RL) {
MsnUser *user = msn_userlist_find_user(state->session->userlist, state->who);
@@ -1385,7 +1385,7 @@ msn_add_contact_to_list(MsnSession *sess
g_return_if_fail(passport != NULL);
g_return_if_fail(list < 5);
- purple_debug_info("MSN CL", "Adding contact %s to %s list\n", passport, MsnMemberRole[list]);
+ purple_debug_info("msn", "Adding contact %s to %s list\n", passport, MsnMemberRole[list]);
if (state == NULL) {
state = msn_callback_state_new(session);
@@ -1415,7 +1415,7 @@ msn_gleams_read_cb(MsnSoapMessage *req,
static void
msn_gleams_read_cb(MsnSoapMessage *req, MsnSoapMessage *resp, gpointer data)
{
- purple_debug_info("MSNP14","Gleams read done\n");
+ purple_debug_info("msn", "Gleams read done\n");
}
/*get the gleams info*/
@@ -1424,7 +1424,7 @@ msn_get_gleams(MsnSession *session)
{
MsnSoapReq *soap_request;
- purple_debug_info("MSNP14","msn get gleams info...\n");
+ purple_debug_info("msn", "msn get gleams info...\n");
state = msn_callback_state_new(session);
state->body = xmlnode_from_str(MSN_GLEAMS_TEMPLATE, -1);
@@ -1447,7 +1447,7 @@ msn_group_read_cb(MsnSoapMessage *req, M
MsnSession *session;
MsnUserList *userlist;
- purple_debug_info("MSNCL", "Group request successful.\n");
+ purple_debug_info("msn", "Group request successful.\n");
g_return_if_fail(state->session != NULL);
g_return_if_fail(state->session->userlist != NULL);
@@ -1472,7 +1472,7 @@ msn_group_read_cb(MsnSoapMessage *req, M
char *guid = xmlnode_get_data(guid_node);
/* create and add the new group to the userlist */
- purple_debug_info("MSNCL", "Adding group %s with guid = %s to the userlist\n", state->new_group_name, guid);
+ purple_debug_info("msn", "Adding group %s with guid = %s to the userlist\n", state->new_group_name, guid);
msn_group_new(session->userlist, guid, state->new_group_name);
if (state->action & MSN_ADD_BUDDY) {
@@ -1488,7 +1488,7 @@ msn_group_read_cb(MsnSoapMessage *req, M
}
g_free(guid);
} else {
- purple_debug_info("MSNCL", "Adding group %s failed\n",
+ purple_debug_info("msn", "Adding group %s failed\n",
state->new_group_name);
}
}
@@ -1513,7 +1513,7 @@ msn_add_group(MsnSession *session, MsnCa
g_return_if_fail(session != NULL);
g_return_if_fail(group_name != NULL);
- purple_debug_info("MSNCL","Adding group %s to contact list.\n", group_name);
+ purple_debug_info("msn", "Adding group %s to contact list.\n", group_name);
if (state == NULL) {
state = msn_callback_state_new(session);
@@ -1549,7 +1549,7 @@ msn_del_group(MsnSession *session, const
g_return_if_fail(session != NULL);
g_return_if_fail(group_name != NULL);
- purple_debug_info("MSNCL","Deleting group %s from contact list\n", group_name);
+ purple_debug_info("msn", "Deleting group %s from contact list\n", group_name);
guid = msn_userlist_find_group_id(session->userlist, group_name);
@@ -1557,7 +1557,7 @@ msn_del_group(MsnSession *session, const
* we need to delete nothing
*/
if (guid == NULL) {
- purple_debug_info("MSNCL", "Group %s guid not found, returning.\n", group_name);
+ purple_debug_info("msn", "Group %s guid not found, returning.\n", group_name);
return;
}
@@ -1595,7 +1595,7 @@ msn_contact_rename_group(MsnSession *ses
g_return_if_fail(old_group_name != NULL);
g_return_if_fail(new_group_name != NULL);
- purple_debug_info("MSN CL", "Renaming group %s to %s.\n", old_group_name, new_group_name);
+ purple_debug_info("msn", "Renaming group %s to %s.\n", old_group_name, new_group_name);
guid = msn_userlist_find_group_id(session->userlist, old_group_name);
if (guid == NULL)
============================================================
--- libpurple/protocols/msn/msn.c 3091971379089842fb9c279daf84a2796f36c720
+++ libpurple/protocols/msn/msn.c 8fb39767f0b0f2ec2256f5dffff2ef2151bec494
@@ -1102,7 +1102,7 @@ msn_send_im(PurpleConnection *gc, const
char *msgtext;
const char *username;
- purple_debug_info("MSNP14","send IM {%s} to %s\n",message,who);
+ purple_debug_info("msn", "send IM {%s} to %s\n",message,who);
account = purple_connection_get_account(gc);
username = purple_account_get_username(account);
@@ -1141,7 +1141,7 @@ msn_send_im(PurpleConnection *gc, const
g_free(msgformat);
g_free(msgtext);
- purple_debug_info("MSNP14","prepare to send online Message\n");
+ purple_debug_info("msn", "prepare to send online Message\n");
if (g_ascii_strcasecmp(who, username))
{
MsnEmoticon *smile;
@@ -1150,10 +1150,10 @@ msn_send_im(PurpleConnection *gc, const
if(msn_user_is_yahoo(account,who)){
/*we send the online and offline Message to Yahoo User via UBM*/
- purple_debug_info("MSNP14","send to Yahoo User\n");
+ purple_debug_info("msn", "send to Yahoo User\n");
uum_send_msg(session,msg);
}else{
- purple_debug_info("MSNP14","send via switchboard\n");
+ purple_debug_info("msn", "send via switchboard\n");
swboard = msn_session_get_swboard(session, who, MSN_SB_FLAG_IM);
smileys = msn_msg_grab_emoticons(message, username);
while (smileys) {
@@ -1206,7 +1206,7 @@ msn_send_im(PurpleConnection *gc, const
/*send Offline Instant Message,only to MSN Passport User*/
char *friendname;
- purple_debug_info("MSNP14","prepare to send offline Message\n");
+ purple_debug_info("msn", "prepare to send offline Message\n");
friendname = msn_encode_mime(account->username);
msn_oim_prep_send_msg_info(session->oim,
@@ -1356,7 +1356,7 @@ msn_add_buddy(PurpleConnection *gc, Purp
userlist = session->userlist;
who = msn_normalize(gc->account, buddy->name);
- purple_debug_info("MSN","Add user:%s to group:%s\n", who, (group && group->name) ? group->name : "(null)");
+ purple_debug_info("msn", "Add user:%s to group:%s\n", who, (group && group->name) ? group->name : "(null)");
if (!session->logged_in)
{
#if 0
@@ -1736,12 +1736,12 @@ msn_remove_group(PurpleConnection *gc, P
session = gc->proto_data;
cmdproc = session->notification->cmdproc;
- purple_debug_info("MSN", "Remove group %s\n", group->name);
+ purple_debug_info("msn", "Remove group %s\n", group->name);
/*we can't delete the default group*/
if(!strcmp(group->name, MSN_INDIVIDUALS_GROUP_NAME)||
!strcmp(group->name, MSN_NON_IM_GROUP_NAME))
{
- purple_debug_info("MSN", "This group can't be removed, returning.\n");
+ purple_debug_info("msn", "This group can't be removed, returning.\n");
return ;
}
@@ -2241,7 +2241,7 @@ msn_got_info(PurpleUtilFetchUrlData *url
#if PHOTO_SUPPORT
/* Find the URL to the photo; must be before the marshalling [Bug 994207] */
photo_url_text = msn_get_photo_url(url_text);
- purple_debug_info("MSNP14","photo url:{%s}\n", photo_url_text ? photo_url_text : "(null)");
+ purple_debug_info("msn", "photo url:{%s}\n", photo_url_text ? photo_url_text : "(null)");
/* Marshall the existing state */
info2_data = g_new0(MsnGetInfoStepTwoData, 1);
============================================================
--- libpurple/protocols/msn/msnutils.c 85023c0b73ff69b0ca1a86b463097fe0180fce66
+++ libpurple/protocols/msn/msnutils.c 4fd2ea5ae69e8d6f62b4ac26d60eee5ebcae4cf2
@@ -487,7 +487,7 @@ msn_convert_iso8601(const char *timestr,
struct tm ctime;
time_t ts;
- purple_debug_info("MSNP14","convert string is{%s}\n",timestr);
+ purple_debug_info("msn", "convert string is{%s}\n", timestr);
tzset();
/*copy string first*/
memset(temp, 0, sizeof(temp));
============================================================
--- libpurple/protocols/msn/nexus.c 2413bbd25a4aeec566f490942fb63d2d5ed808ca
+++ libpurple/protocols/msn/nexus.c b5b322014390eea8ecd47a7ee9124beee4726efc
@@ -291,7 +291,7 @@ nexus_parse_token(MsnNexus *nexus, int i
FALSE, NULL, NULL, NULL);
g_free(expiry_str);
- purple_debug_info("msnp15", "Updated ticket for domain '%s', expires at %" G_GINT64_FORMAT ".\n",
+ purple_debug_info("msn", "Updated ticket for domain '%s', expires at %" G_GINT64_FORMAT ".\n",
ticket_domains[id][SSO_VALID_TICKET_DOMAIN],
(gint64)nexus->tokens[id].expiry);
return TRUE;
@@ -372,13 +372,13 @@ msn_nexus_connect(MsnNexus *nexus)
MsnSoapMessage *soap;
- purple_debug_info("MSN Nexus","Starting Windows Live ID authentication\n");
+ purple_debug_info("msn", "Starting Windows Live ID authentication\n");
msn_session_set_login_step(session, MSN_LOGIN_STEP_GET_COOKIE);
username = purple_account_get_username(session->account);
password = g_strndup(purple_connection_get_password(session->account->gc), 16);
- purple_debug_info("msnp15", "Logging on %s, with policy '%s', nonce '%s'\n",
+ purple_debug_info("msn", "Logging on %s, with policy '%s', nonce '%s'\n",
username, nexus->policy, nexus->nonce);
domains = g_string_new(NULL);
@@ -418,7 +418,7 @@ nexus_got_update_cb(MsnSoapMessage *req,
#endif
char *decrypted_data;
- purple_debug_info("msnp15", "Got Update Response for %s.\n", ticket_domains[ud->id][SSO_VALID_TICKET_DOMAIN]);
+ purple_debug_info("msn", "Got Update Response for %s.\n", ticket_domains[ud->id][SSO_VALID_TICKET_DOMAIN]);
enckey = xmlnode_get_child(resp->xml, "Header/Security/DerivedKeyToken");
while (enckey) {
@@ -427,7 +427,7 @@ nexus_got_update_cb(MsnSoapMessage *req,
enckey = xmlnode_get_next_twin(enckey);
}
if (!enckey) {
- purple_debug_info("msnp15", "Invalid Response.\n");
+ purple_debug_error("msn", "Invalid response in token update.\n");
return;
}
@@ -444,7 +444,7 @@ nexus_got_update_cb(MsnSoapMessage *req,
if (tmp) {
decrypted_pp = des3_cbc(key, iv, tmp, len, TRUE);
g_free(tmp);
- purple_debug_info("msnp15", "Got Response Header EncryptedPP: %s\n", decrypted_pp);
+ purple_debug_info("msn", "Got Response Header EncryptedPP: %s\n", decrypted_pp);
g_free(decrypted_pp);
}
#endif
@@ -460,7 +460,7 @@ nexus_got_update_cb(MsnSoapMessage *req,
decrypted_data = des3_cbc(key, iv, unescaped, len, TRUE);
g_free(unescaped);
- purple_debug_info("msnp15", "Got Response Body EncryptedData: %s\n", decrypted_data);
+ purple_debug_info("msn", "Got Response Body EncryptedData: %s\n", decrypted_data);
rstresponse = xmlnode_from_str(decrypted_data, -1);
if (g_str_equal(rstresponse->name, "RequestSecurityTokenResponse"))
@@ -507,7 +507,7 @@ msn_nexus_update_token(MsnNexus *nexus,
char *request;
MsnSoapMessage *soap;
- purple_debug_info("msnp15",
+ purple_debug_info("msn",
"Updating ticket for user '%s' on domain '%s'\n",
purple_account_get_username(session->account),
ticket_domains[id][SSO_VALID_TICKET_DOMAIN]);
============================================================
--- libpurple/protocols/msn/notification.c 0c821870b36ed3ba7154cae73378b33e18b814bd
+++ libpurple/protocols/msn/notification.c f1ca8972fce959dec26ffd5426a4098626e6d7ef
@@ -375,7 +375,7 @@ msg_cmd(MsnCmdProc *cmdproc, MsnCommand
static void
msg_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd)
{
- purple_debug_info("MSNP14","Processing MSG... \n");
+ purple_debug_info("msn", "Processing MSG... \n");
/* NOTE: cmd is not always cmdproc->last_cmd, sometimes cmd is a queued
* command and we are processing it */
@@ -387,7 +387,7 @@ msg_cmd(MsnCmdProc *cmdproc, MsnCommand
g_return_if_fail(cmd->payload_cb != NULL);
#if 0 /* glib on win32 doesn't correctly support precision modifiers for a string */
- purple_debug_info("MSNP14", "MSG payload:{%.*s}\n", cmd->payload_len, cmd->payload);
+ purple_debug_info("msn", "MSG payload:{%.*s}\n", cmd->payload_len, cmd->payload);
#endif
cmd->payload_cb(cmdproc, cmd, cmd->payload, cmd->payload_len);
}
@@ -406,7 +406,7 @@ uum_send_msg(MsnSession *session,MsnMess
cmdproc = session->notification->cmdproc;
g_return_if_fail(msg != NULL);
payload = msn_message_gen_payload(msg, &payload_len);
- purple_debug_info("MSNP14",
+ purple_debug_info("msn",
"send UUM, payload{%s}, strlen:%" G_GSIZE_FORMAT ", len:%" G_GSIZE_FORMAT "\n",
payload, strlen(payload), payload_len);
type = msg->type;
@@ -426,7 +426,7 @@ ubm_cmd_post(MsnCmdProc *cmdproc, MsnCom
const char *passport;
const char *content_type;
- purple_debug_info("MSNP14","Process UBM payload:%.*s\n", (guint)len, payload);
+ purple_debug_info("msn", "Process UBM payload:%.*s\n", (guint)len, payload);
msg = msn_message_new_from_cmd(cmdproc->session, cmd);
msn_message_parse_payload(msg, payload, len,MSG_LINE_DEM,MSG_BODY_DEM);
@@ -438,7 +438,7 @@ ubm_cmd_post(MsnCmdProc *cmdproc, MsnCom
passport = msg->remote_user;
content_type = msn_message_get_content_type(msg);
- purple_debug_info("MSNP14", "type:%s\n", content_type);
+ purple_debug_info("msn", "type:%s\n", content_type);
if(!strcmp(content_type,"text/plain")){
const char *value;
const char *body;
@@ -496,7 +496,7 @@ ubm_cmd(MsnCmdProc *cmdproc, MsnCommand
static void
ubm_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd)
{
- purple_debug_info("MSNP14","Processing UBM... \n");
+ purple_debug_info("msn", "Processing UBM... \n");
/* NOTE: cmd is not always cmdproc->last_cmd, sometimes cmd is a queued
* command and we are processing it */
@@ -506,7 +506,7 @@ ubm_cmd(MsnCmdProc *cmdproc, MsnCommand
} else {
g_return_if_fail(cmd->payload_cb != NULL);
- purple_debug_info("MSNP14", "UBM payload:{%.*s}\n", (guint)(cmd->payload_len), cmd->payload);
+ purple_debug_info("msn", "UBM payload:{%.*s}\n", (guint)(cmd->payload_len), cmd->payload);
msg_cmd_post(cmdproc, cmd, cmd->payload, cmd->payload_len);
}
}
@@ -543,7 +543,7 @@ msn_add_contact_xml(MsnSession *session,
g_return_if_fail(passport != NULL);
- purple_debug_info("MSNP14","Passport: %s, type: %d\n", passport, networkId);
+ purple_debug_info("msn", "Passport: %s, type: %d\n", passport, networkId);
tokens = g_strsplit(passport, "@", 2);
email = tokens[0];
domain = tokens[1];
@@ -577,7 +577,7 @@ msn_add_contact_xml(MsnSession *session,
c_node = xmlnode_new("c");
xmlnode_set_attrib(c_node, "n", email);
- purple_debug_info("MSNP14", "list_op: %d\n", list_op);
+ purple_debug_info("msn", "list_op: %d\n", list_op);
g_snprintf(fmt_str, sizeof(fmt_str), "%d", list_op);
xmlnode_set_attrib(c_node, "l", fmt_str);
@@ -601,7 +601,7 @@ msn_notification_post_adl(MsnCmdProc *cm
msn_notification_post_adl(MsnCmdProc *cmdproc, const char *payload, int payload_len)
{
MsnTransaction *trans;
- purple_debug_info("MSN Notification","Sending ADL with payload: %s\n", payload);
+ purple_debug_info("msn", "Sending ADL with payload: %s\n", payload);
trans = msn_transaction_new(cmdproc, "ADL", "%i", payload_len);
msn_transaction_set_payload(trans, payload, payload_len);
msn_cmdproc_send_trans(cmdproc, trans);
@@ -705,14 +705,14 @@ adl_cmd_parse(MsnCmdProc *cmdproc, MsnCo
{
xmlnode *root, *domain_node;
- purple_debug_misc("MSN Notification", "Parsing received ADL XML data\n");
+ purple_debug_misc("msn", "Parsing received ADL XML data\n");
g_return_if_fail(payload != NULL);
root = xmlnode_from_str(payload, (gssize) len);
if (root == NULL) {
- purple_debug_info("MSN Notification", "Invalid XML!\n");
+ purple_debug_info("msn", "Invalid XML in ADL!\n");
return;
}
for (domain_node = xmlnode_get_child(root, "d"); domain_node; domain_node = xmlnode_get_next_twin(domain_node)) {
@@ -790,7 +790,7 @@ adl_error(MsnCmdProc *cmdproc, MsnTransa
account = session->account;
gc = purple_account_get_connection(account);
- purple_debug_error("msn","ADL error\n");
+ purple_debug_error("msn", "ADL error\n");
reason = g_strdup_printf(_("Unknown error (%d)"), error);
purple_notify_error(gc, NULL, _("Unable to add user"), reason);
g_free(reason);
@@ -800,7 +800,7 @@ fqy_cmd_post(MsnCmdProc *cmdproc, MsnCom
fqy_cmd_post(MsnCmdProc *cmdproc, MsnCommand *cmd, char *payload,
size_t len)
{
- purple_debug_info("MSN Notification","FQY payload:\n%s\n", payload);
+ purple_debug_info("msn", "FQY payload:\n%s\n", payload);
g_return_if_fail(cmdproc->session != NULL);
// msn_notification_post_adl(cmdproc, payload, len);
// msn_get_address_book(cmdproc->session, MSN_AB_SAVE_CONTACT, NULL, NULL);
@@ -809,7 +809,7 @@ fqy_cmd(MsnCmdProc *cmdproc, MsnCommand
static void
fqy_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd)
{
- purple_debug_info("MSNP14","Process FQY\n");
+ purple_debug_info("msn", "Process FQY\n");
cmdproc->last_cmd->payload_cb = fqy_cmd_post;
cmd->payload_len = atoi(cmd->params[1]);
}
@@ -825,7 +825,7 @@ rml_cmd(MsnCmdProc *cmdproc, MsnCommand
static void
rml_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd)
{
- purple_debug_info("MSNP14","Process RML\n");
+ purple_debug_info("msn", "Process RML\n");
cmd->payload_len = atoi(cmd->params[1]);
cmdproc->last_cmd->payload_cb = rml_cmd_post;
}
@@ -1599,7 +1599,7 @@ gcf_cmd_post(MsnCmdProc *cmdproc, MsnCom
if ( (root = xmlnode_from_str(cmd->payload, cmd->payload_len)) == NULL)
{
- purple_debug_error("MSN","Unable to parse GCF payload into a XML tree");
+ purple_debug_error("msn", "Unable to parse GCF payload into a XML tree");
return;
}
@@ -1635,7 +1635,7 @@ gcf_cmd(MsnCmdProc *cmdproc, MsnCommand
static void
gcf_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd)
{
- purple_debug_info("MSNP14","Processing GCF command\n");
+ purple_debug_info("msn", "Processing GCF command\n");
cmdproc->last_cmd->payload_cb = gcf_cmd_post;
cmd->payload_len = atoi(cmd->params[1]);
@@ -1644,7 +1644,7 @@ sbs_cmd(MsnCmdProc *cmdproc, MsnCommand
static void
sbs_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd)
{
- purple_debug_info("MSNP14","Processing SBS... \n");
+ purple_debug_info("msn", "Processing SBS... \n");
if(cmd->payload_len == 0){
return;
}
@@ -1693,7 +1693,7 @@ ubx_cmd(MsnCmdProc *cmdproc, MsnCommand
static void
ubx_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd)
{
- purple_debug_misc("MSNP14","UBX received.\n");
+ purple_debug_misc("msn", "UBX received.\n");
cmdproc->last_cmd->payload_cb = ubx_cmd_post;
cmd->payload_len = atoi(cmd->params[2]);
}
@@ -1909,7 +1909,7 @@ delete_oim_msg(MsnCmdProc *cmdproc, MsnM
static void
delete_oim_msg(MsnCmdProc *cmdproc, MsnMessage *msg)
{
- purple_debug_misc("MSN Notification","Delete OIM message.\n");
+ purple_debug_misc("msn", "Delete OIM message.\n");
}
static void
@@ -2059,7 +2059,7 @@ msn_notification_rem_buddy_from_list(Msn
payload = xmlnode_to_str(rml_node, &payload_len);
xmlnode_free(rml_node);
- purple_debug_info("MSN Notification","Send RML with payload:\n%s\n", payload);
+ purple_debug_info("msn", "Send RML with payload:\n%s\n", payload);
trans = msn_transaction_new(cmdproc, "RML","%" G_GSIZE_FORMAT, strlen(payload));
msn_transaction_set_payload(trans, payload, strlen(payload));
msn_cmdproc_send_trans(cmdproc, trans);
============================================================
--- libpurple/protocols/msn/oim.c 804cfe2ec71c7c829c01047753e0abe727c837e1
+++ libpurple/protocols/msn/oim.c 297b1c4d34b16b6c9a75b2753078c22238509d86
@@ -73,7 +73,7 @@ msn_oim_destroy(MsnOim *oim)
{
MsnOimSendReq *request;
- purple_debug_info("OIM", "destroy the OIM %p\n", oim);
+ purple_debug_info("msn", "destroy the OIM %p\n", oim);
g_free(oim->run_id);
g_free(oim->challenge);
@@ -146,7 +146,7 @@ msn_oim_request_cb(MsnSoapMessage *reque
gchar *faultcode_str = xmlnode_get_data(faultcode);
if (faultcode_str && g_str_equal(faultcode_str, "q0:BadContextToken")) {
- purple_debug_error("msnp15", "OIM Request Error, Updating token now.");
+ purple_debug_warning("msn", "OIM Request Error, Updating token now.");
msn_nexus_update_token(data->oim->session->nexus,
data->send ? MSN_AUTH_LIVE_SECURE : MSN_AUTH_MESSENGER_WEB,
(GSourceFunc)msn_oim_request_helper, data);
@@ -155,7 +155,7 @@ msn_oim_request_cb(MsnSoapMessage *reque
} else if (faultcode_str && g_str_equal(faultcode_str, "q0:AuthenticationFailed")) {
if (xmlnode_get_child(fault, "detail/RequiredAuthPolicy") != NULL) {
- purple_debug_error("msnp15", "OIM Request Error, Updating token now.");
+ purple_debug_warning("msn", "OIM Request Error, Updating token now.");
msn_nexus_update_token(data->oim->session->nexus,
data->send ? MSN_AUTH_LIVE_SECURE : MSN_AUTH_MESSENGER_WEB,
(GSourceFunc)msn_oim_request_helper, data);
@@ -272,9 +272,9 @@ msn_oim_msg_to_str(MsnOim *oim, const ch
{
char *oim_body,*oim_base64;
- purple_debug_info("MSN OIM","encode OIM Message...\n");
+ purple_debug_info("msn", "encode OIM Message...\n");
oim_base64 = purple_base64_encode((const guchar *)body, strlen(body));
- purple_debug_info("MSN OIM","encoded base64 body:{%s}\n",oim_base64);
+ purple_debug_info("msn", "encoded base64 body:{%s}\n", oim_base64);
oim_body = g_strdup_printf(MSN_OIM_MSG_TEMPLATE,
oim->run_id,oim->send_seq,oim_base64);
g_free(oim_base64);
@@ -296,13 +296,13 @@ msn_oim_send_read_cb(MsnSoapMessage *req
g_return_if_fail(msg != NULL);
if (response == NULL) {
- purple_debug_info("MSNP14", "cannot send OIM: %s\n", msg->oim_msg);
+ purple_debug_info("msn", "cannot send OIM: %s\n", msg->oim_msg);
} else {
xmlnode *faultNode = xmlnode_get_child(response->xml, "Body/Fault");
if (faultNode == NULL) {
/*Send OK! return*/
- purple_debug_info("MSNP14", "sent OIM: %s\n", msg->oim_msg);
+ purple_debug_info("msn", "sent OIM: %s\n", msg->oim_msg);
} else {
xmlnode *faultcode = xmlnode_get_child(faultNode, "faultcode");
@@ -318,13 +318,13 @@ msn_oim_send_read_cb(MsnSoapMessage *req
g_free(oim->challenge);
oim->challenge = NULL;
- purple_debug_info("msnoim","resending OIM: %s\n",
+ purple_debug_info("msn", "Resending OIM: %s\n",
msg->oim_msg);
g_queue_push_head(oim->send_queue, msg);
msn_oim_send_msg(oim);
} else {
- purple_debug_info("msnoim",
- "can't find lock key for OIM: %s\n",
+ purple_debug_info("msn",
+ "Can't find lock key for OIM: %s\n",
msg->oim_msg);
}
} else {
@@ -336,10 +336,10 @@ msn_oim_send_read_cb(MsnSoapMessage *req
g_free(oim->challenge);
oim->challenge = g_strndup(buf, sizeof(buf));
g_free(challenge);
- purple_debug_info("MSNP14","lockkey:{%s}\n",oim->challenge);
+ purple_debug_info("msn", "Found lockkey:{%s}\n", oim->challenge);
/*repost the send*/
- purple_debug_info("MSNP14","resending OIM: %s\n", msg->oim_msg);
+ purple_debug_info("msn", "Resending OIM: %s\n", msg->oim_msg);
g_queue_push_head(oim->send_queue, msg);
msn_oim_send_msg(oim);
}
@@ -400,13 +400,13 @@ msn_oim_send_msg(MsnOim *oim)
oim_request = g_queue_peek_head(oim->send_queue);
g_return_if_fail(oim_request != NULL);
- purple_debug_info("MSNP14","sending OIM: %s\n", oim_request->oim_msg);
+ purple_debug_info("msn", "Sending OIM: %s\n", oim_request->oim_msg);
/* if we got the challenge lock key, we compute it
* else we go for the SOAP fault and resend it.
*/
- if(oim->challenge == NULL){
- purple_debug_info("MSNP14","no lock key challenge, wait for SOAP Fault and Resend\n");
+ if (oim->challenge == NULL){
+ purple_debug_info("msn", "No lock key challenge, waiting for SOAP Fault and Resend\n");
}
msg_body = msn_oim_msg_to_str(oim, oim_request->oim_msg);
@@ -442,12 +442,12 @@ msn_oim_delete_read_cb(MsnSoapMessage *r
MsnOimRecvData *rdata = data;
if (response && xmlnode_get_child(response->xml, "Body/Fault") == NULL) {
- purple_debug_info("msnoim", "delete OIM success\n");
+ purple_debug_info("msn", "Delete OIM success\n");
rdata->oim->oim_list = g_list_remove(rdata->oim->oim_list,
rdata->msg_id);
g_free(rdata->msg_id);
} else {
- purple_debug_info("msnoim", "delete OIM failed\n");
+ purple_debug_info("msn", "Delete OIM failed\n");
}
g_free(rdata);
@@ -461,7 +461,7 @@ msn_oim_post_delete_msg(MsnOimRecvData *
char *msgid = rdata->msg_id;
char *soap_body;
- purple_debug_info("MSNP14","Delete single OIM Message {%s}\n",msgid);
+ purple_debug_info("msn", "Delete single OIM Message {%s}\n",msgid);
soap_body = g_strdup_printf(MSN_OIM_DEL_TEMPLATE, msgid);
@@ -540,7 +540,7 @@ msn_oim_parse_timestamp(const char *time
}
}
- purple_debug_info("MSNP14:OIM", "Can't parse timestamp %s\n", timestamp);
+ purple_debug_info("msn", "Can't parse timestamp %s\n", timestamp);
return tval;
}
@@ -561,30 +561,30 @@ msn_oim_report_to_user(MsnOimRecvData *r
msn_message_parse_payload(message, msg_str, strlen(msg_str),
MSG_OIM_LINE_DEM, MSG_OIM_BODY_DEM);
- purple_debug_info("MSNP14","oim body:{%s}\n",message->body);
+ purple_debug_info("msn", "oim body:{%s}\n", message->body);
decode_msg = (char *)purple_base64_decode(message->body,&body_len);
date = (char *)g_hash_table_lookup(message->attr_table, "Date");
from = (char *)g_hash_table_lookup(message->attr_table, "From");
- if(strstr(from," ")){
+ if (strstr(from," ")) {
has_nick = 1;
}
- if(has_nick){
+ if (has_nick) {
tokens = g_strsplit(from , " " , 2);
passport_str = g_strdup(tokens[1]);
- purple_debug_info("MSNP14","oim Date:{%s},nickname:{%s},tokens[1]:{%s} passport{%s}\n",
- date,tokens[0],tokens[1],passport_str);
+ purple_debug_info("msn", "oim Date:{%s},nickname:{%s},tokens[1]:{%s} passport{%s}\n",
+ date, tokens[0], tokens[1], passport_str);
g_strfreev(tokens);
- }else{
+ } else {
passport_str = g_strdup(from);
- purple_debug_info("MSNP14","oim Date:{%s},passport{%s}\n",
- date,passport_str);
+ purple_debug_info("msn", "oim Date:{%s},passport{%s}\n",
+ date, passport_str);
}
start = strstr(passport_str,"<");
start += 1;
end = strstr(passport_str,">");
passport = g_strndup(start,end - start);
g_free(passport_str);
- purple_debug_info("MSN OIM","oim Date:{%s},passport{%s}\n",date,passport);
+ purple_debug_info("msn", "oim Date:{%s},passport{%s}\n", date, passport);
stamp = msn_oim_parse_timestamp(date);
@@ -619,11 +619,11 @@ msn_oim_get_read_cb(MsnSoapMessage *requ
g_free(msg_str);
} else {
char *str = xmlnode_to_str(response->xml, NULL);
- purple_debug_info("msnoim", "Unknown response: %s\n", str);
+ purple_debug_info("msn", "Unknown OIM response: %s\n", str);
g_free(str);
}
} else {
- purple_debug_info("msnoim", "Failed to get OIM\n");
+ purple_debug_info("msn", "Failed to get OIM\n");
}
}
@@ -635,7 +635,7 @@ msn_parse_oim_msg(MsnOim *oim,const char
{
xmlnode *node;
- purple_debug_info("MSNP14:OIM", "%s\n", xmlmsg);
+ purple_debug_info("msn", "%s\n", xmlmsg);
if (!strcmp(xmlmsg, "too-large")) {
/* Too many OIM's to send via NS, so we need to request them via SOAP. */
@@ -658,7 +658,7 @@ msn_parse_oim_xml(MsnOim *oim, xmlnode *
if (strcmp(node->name, "MD") != 0) {
char *xmlmsg = xmlnode_to_str(node, NULL);
- purple_debug_info("msnoim", "WTF is this? %s\n", xmlmsg);
+ purple_debug_info("msn", "WTF is this? %s\n", xmlmsg);
g_free(xmlmsg);
return;
}
@@ -697,7 +697,7 @@ msn_parse_oim_xml(MsnOim *oim, xmlnode *
if (rt_node != NULL) {
rtime = xmlnode_get_data(rt_node);
}
-/* purple_debug_info("msnoim","E:{%s},I:{%s},rTime:{%s}\n",passport,msgid,rTime); */
+/* purple_debug_info("msn", "E:{%s},I:{%s},rTime:{%s}\n",passport,msgid,rTime); */
if (!g_list_find_custom(oim->oim_list, msgid, (GCompareFunc)strcmp)) {
oim->oim_list = g_list_append(oim->oim_list, msgid);
@@ -719,7 +719,7 @@ msn_oim_post_single_get_msg(MsnOim *oim,
char *soap_body;
MsnOimRecvData *data = g_new0(MsnOimRecvData, 1);
- purple_debug_info("MSNP14","Get single OIM Message\n");
+ purple_debug_info("msn", "Get single OIM Message\n");
data->oim = oim;
data->msg_id = msgid;
============================================================
--- libpurple/protocols/msn/state.c 817dd9f223e9a56533b32d70c7e95c1acf4eb488
+++ libpurple/protocols/msn/state.c 574b93addabdd165576c0b962547aaadb180b762
@@ -151,15 +151,15 @@ msn_get_currentmedia(char *xml_str, gsiz
xmlnode *payloadNode, *currentmediaNode;
char *currentmedia;
- purple_debug_info("msn","msn get CurrentMedia\n");
+ purple_debug_info("msn", "Get CurrentMedia\n");
payloadNode = xmlnode_from_str(xml_str, len);
- if (!payloadNode){
- purple_debug_error("msn","PSM XML parse Error!\n");
+ if (!payloadNode) {
+ purple_debug_error("msn", "PSM XML parse Error!\n");
return NULL;
}
currentmediaNode = xmlnode_get_child(payloadNode, "CurrentMedia");
- if (currentmediaNode == NULL){
- purple_debug_info("msn","No CurrentMedia Node");
+ if (currentmediaNode == NULL) {
+ purple_debug_info("msn", "No CurrentMedia Node");
xmlnode_free(payloadNode);
return NULL;
}
@@ -177,15 +177,15 @@ msn_get_psm(char *xml_str, gsize len)
xmlnode *payloadNode, *psmNode;
char *psm;
- purple_debug_info("MSNP14","msn get PSM\n");
+ purple_debug_info("msn", "msn get PSM\n");
payloadNode = xmlnode_from_str(xml_str, len);
if (!payloadNode){
- purple_debug_error("MSNP14","PSM XML parse Error!\n");
+ purple_debug_error("msn", "PSM XML parse Error!\n");
return NULL;
}
psmNode = xmlnode_get_child(payloadNode, "PSM");
if (psmNode == NULL){
- purple_debug_info("MSNP14","No PSM status Node");
+ purple_debug_info("msn", "No PSM status Node");
xmlnode_free(payloadNode);
return NULL;
}
@@ -249,7 +249,7 @@ msn_set_psm(MsnSession *session)
session->psm = msn_build_psm(statusline_stripped, media, NULL);
payload = session->psm;
- purple_debug_misc("MSNP14","Sending UUX command with payload: %s\n",payload);
+ purple_debug_misc("msn", "Sending UUX command with payload: %s\n", payload);
trans = msn_transaction_new(cmdproc, "UUX", "%" G_GSIZE_FORMAT, strlen(payload));
msn_transaction_set_payload(trans, payload, strlen(payload));
msn_cmdproc_send_trans(cmdproc, trans);
============================================================
--- libpurple/protocols/msn/switchboard.c e1620a3daec10ff7ea5e83255f61e61585610a4e
+++ libpurple/protocols/msn/switchboard.c 86dcb083a0e201348a7c56aa245ca3b937575747
@@ -338,7 +338,7 @@ swboard_error_helper(MsnSwitchBoard *swb
{
g_return_if_fail(swboard != NULL);
- purple_debug_warning("msg", "Error: Unable to call the user %s for reason %i\n",
+ purple_debug_warning("msn", "Error: Unable to call the user %s for reason %i\n",
passport ? passport : "(null)", reason);
/* TODO: if current_users > 0, this is probably a chat and an invite failed,
@@ -540,7 +540,7 @@ release_msg(MsnSwitchBoard *swboard, Msn
payload = msn_message_gen_payload(msg, &payload_len);
#ifdef MSN_DEBUG_SB
- purple_debug_info("MSNP14","SB length:{%d}",payload_len);
+ purple_debug_info("msn", "SB length:{%d}", payload_len);
msn_message_show_readable(msg, "SB SEND", FALSE);
#endif
@@ -628,7 +628,7 @@ msn_switchboard_send_msg(MsnSwitchBoard
g_return_if_fail(swboard != NULL);
g_return_if_fail(msg != NULL);
- purple_debug_info("MSNP14","switchboard send msg..\n");
+ purple_debug_info("msn", "switchboard send msg..\n");
if (msn_switchboard_can_send(swboard))
release_msg(swboard, msg);
else if (queue)
@@ -662,7 +662,7 @@ bye_cmd(MsnCmdProc *cmdproc, MsnCommand
g_return_if_fail(swboard != NULL);
if (!(swboard->flag & MSN_SB_FLAG_IM) && (swboard->conv != NULL))
- purple_debug_error("msn_switchboard", "bye_cmd: helper bug\n");
+ purple_debug_error("msn", "bye_cmd: helper bug\n");
if (swboard->conv == NULL)
{
@@ -759,7 +759,7 @@ ubm_cmd(MsnCmdProc *cmdproc, MsnCommand
static void
ubm_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd)
{
- purple_debug_misc("MSNP14","get UBM...\n");
+ purple_debug_misc("msn", "get UBM...\n");
cmd->payload_len = atoi(cmd->params[4]);
cmdproc->last_cmd->payload_cb = msg_cmd_post;
}
@@ -1139,7 +1139,7 @@ cal_error(MsnCmdProc *cmdproc, MsnTransa
purple_debug_warning("msn", "cal_error: command %s gave error %i\n", trans->command, error);
while ((msg = g_queue_pop_head(swboard->msg_queue)) != NULL){
- purple_debug_warning("MSNP14", "Unable to send msg: {%s}\n", msg->body);
+ purple_debug_warning("msn", "Unable to send msg: {%s}\n", msg->body);
/* The messages could not be sent due to a switchboard error */
swboard->error = MSN_SB_ERROR_USER_OFFLINE;
msg_error_helper(swboard->cmdproc, msg,
@@ -1189,7 +1189,7 @@ got_swboard(MsnCmdProc *cmdproc, MsnComm
/* The conversation window was closed. */
return;
- purple_debug_info("MSNP14","Switchboard:auth:{%s} socket:{%s}\n",cmd->params[4],cmd->params[2]);
+ purple_debug_info("msn", "Switchboard:auth:{%s} socket:{%s}\n", cmd->params[4], cmd->params[2]);
msn_switchboard_set_auth_key(swboard, cmd->params[4]);
msn_parse_socket(cmd->params[2], &host, &port);
============================================================
--- libpurple/protocols/msn/user.c ec67b73ba2f52576bcde545f78ecb89621e8f6bc
+++ libpurple/protocols/msn/user.c 28cbd14450d2d51336f4da345504d59511d73c09
@@ -257,7 +257,7 @@ msn_user_add_group_id(MsnUser *user, con
group_name = msn_userlist_find_group_name(userlist, group_id);
- purple_debug_info("User","group id:%s,name:%s,user:%s\n", group_id, group_name, passport);
+ purple_debug_info("msn", "User: group id:%s,name:%s,user:%s\n", group_id, group_name, passport);
g = purple_find_group(group_name);
============================================================
--- libpurple/protocols/msn/userlist.c 2539347a1f56e9b68eaa1f908134e66ddfd971b7
+++ libpurple/protocols/msn/userlist.c 94f6aae6b31d1ea68c82a19cbdc36d8ad9ba03ae
@@ -44,7 +44,7 @@ msn_accept_add_cb(gpointer data)
{
MsnPermitAdd *pa = data;
- purple_debug_misc("MSN Userlist", "Accepted the new buddy: %s\n", pa->who);
+ purple_debug_misc("msn", "Accepted the new buddy: %s\n", pa->who);
if (PURPLE_CONNECTION_IS_VALID(pa->gc))
{
@@ -66,7 +66,7 @@ msn_cancel_add_cb(gpointer data)
{
MsnPermitAdd *pa = data;
- purple_debug_misc("MSN Userlist", "Denied the new buddy: %s\n", pa->who);
+ purple_debug_misc("msn", "Denied the new buddy: %s\n", pa->who);
if (PURPLE_CONNECTION_IS_VALID(pa->gc))
{
@@ -196,7 +196,7 @@ msn_got_add_user(MsnSession *session, Ms
const char *passport;
const char *friendly;
- purple_debug_info("MSNP14","got add user...\n");
+ purple_debug_info("msn", "got add user...\n");
account = session->account;
passport = msn_user_get_passport(user);
@@ -484,11 +484,9 @@ msn_userlist_find_user(MsnUserList *user
{
MsnUser *user = (MsnUser *)l->data;
-// purple_debug_info("MsnUserList","user passport:%s,passport:%s\n",user->passport,passport);
g_return_val_if_fail(user->passport != NULL, NULL);
if (!g_strcasecmp(passport, user->passport)){
-// purple_debug_info("MsnUserList","return:%p\n",user);
return user;
}
}
@@ -675,7 +673,7 @@ msn_userlist_rem_buddy_from_list(MsnUser
if ( !msn_userlist_user_is_in_list(user, list_id)) {
list = lists[list_id];
- purple_debug_info("MSN Userlist", "User %s is not in list %s, not removing.\n", who, list);
+ purple_debug_info("msn", "User %s is not in list %s, not removing.\n", who, list);
return;
}
@@ -697,7 +695,7 @@ msn_userlist_add_buddy(MsnUserList *user
g_return_if_fail(userlist != NULL);
g_return_if_fail(userlist->session != NULL);
- purple_debug_info("MSN Userlist", "Add user: %s to group: %s\n", who, new_group_name);
+ purple_debug_info("msn", "Add user: %s to group: %s\n", who, new_group_name);
if (!purple_email_is_valid(who))
{
@@ -723,7 +721,7 @@ msn_userlist_add_buddy(MsnUserList *user
if (group_id == NULL)
{
/* Whoa, we must add that group first. */
- purple_debug_info("MSN Userlist", "Adding user %s to a new group, creating group %s first\n", who, new_group_name);
+ purple_debug_info("msn", "Adding user %s to a new group, creating group %s first\n", who, new_group_name);
msn_callback_state_set_action(state, MSN_ADD_BUDDY);
@@ -741,18 +739,18 @@ msn_userlist_add_buddy(MsnUserList *user
if ( msn_userlist_user_is_in_list(user, MSN_LIST_FL) ) {
- purple_debug_info("MSN Userlist", "User %s already exists\n", who);
+ purple_debug_info("msn", "User %s already exists\n", who);
msn_userlist_rem_buddy_from_list(userlist, who, MSN_LIST_BL);
if (msn_userlist_user_is_in_group(user, group_id)) {
- purple_debug_info("MSN Userlist", "User %s is already in group %s, returning\n", who, new_group_name);
+ purple_debug_info("msn", "User %s is already in group %s, returning\n", who, new_group_name);
msn_callback_state_free(state);
return;
}
}
- purple_debug_info("MSN Userlist", "Adding user: %s to group id: %s\n", who, group_id);
+ purple_debug_info("msn", "Adding user: %s to group id: %s\n", who, group_id);
msn_callback_state_set_action(state, MSN_ADD_BUDDY);
@@ -777,13 +775,13 @@ msn_userlist_add_buddy_to_list(MsnUserLi
if (msn_userlist_user_is_in_list(user, list_id))
{
list = lists[list_id];
- purple_debug_info("MSN Userlist", "User '%s' is already in list: %s\n", who, list);
+ purple_debug_info("msn", "User '%s' is already in list: %s\n", who, list);
return;
}
//friendly_name = (user != NULL) ? get_friendly_name(user) : who;
- //purple_debug_info("MSN Userlist", "store_name = %s\n", store_name);
+ //purple_debug_info("msn", "store_name = %s\n", store_name);
/* XXX: see XXX above, this should really be done when we get the response from
the server */
@@ -804,15 +802,15 @@ msn_userlist_add_buddy_to_group(MsnUserL
g_return_val_if_fail(group_name != NULL, FALSE);
g_return_val_if_fail(who != NULL, FALSE);
- purple_debug_info("MSN Userlist","Adding buddy with passport %s to group %s\n", who, group_name);
+ purple_debug_info("msn", "Adding buddy with passport %s to group %s\n", who, group_name);
if ( (group_id = (gchar *)msn_userlist_find_group_id(userlist, group_name)) == NULL) {
- purple_debug_error("MSN Userlist", "Group %s has no guid!\n", group_name);
+ purple_debug_error("msn", "Group %s has no guid!\n", group_name);
return FALSE;
}
if ( (user = msn_userlist_find_user(userlist, who)) == NULL) {
- purple_debug_error("MSN Userlist", "User %s not found!", who);
+ purple_debug_error("msn", "User %s not found!", who);
return FALSE;
}
@@ -833,15 +831,15 @@ msn_userlist_rem_buddy_from_group(MsnUse
g_return_val_if_fail(group_name != NULL, FALSE);
g_return_val_if_fail(who != NULL, FALSE);
- purple_debug_info("MSN Userlist","Removing buddy with passport %s from group %s\n", who, group_name);
+ purple_debug_info("msn", "Removing buddy with passport %s from group %s\n", who, group_name);
if ( (group_id = msn_userlist_find_group_id(userlist, group_name)) == NULL) {
- purple_debug_error("MSN Userlist", "Group %s has no guid!\n", group_name);
+ purple_debug_error("msn", "Group %s has no guid!\n", group_name);
return FALSE;
}
if ( (user = msn_userlist_find_user(userlist, who)) == NULL) {
- purple_debug_error("MSN Userlist", "User %s not found!", who);
+ purple_debug_error("msn", "User %s not found!", who);
return FALSE;
}
More information about the Commits
mailing list