Mercurial > pidgin.yaz
changeset 27093:f2ca52166a0d
Add a few more roster debug messages and improve.
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Wed, 03 Jun 2009 15:50:08 +0000 |
parents | a500f65bd077 |
children | af4a4ebc6441 335d737c396e |
files | libpurple/protocols/jabber/roster.c |
diffstat | 1 files changed, 29 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/roster.c Wed Jun 03 15:33:55 2009 +0000 +++ b/libpurple/protocols/jabber/roster.c Wed Jun 03 15:50:08 2009 +0000 @@ -282,14 +282,23 @@ return; if(grps) { + GString *out = g_string_new(NULL); groups = grps; + for (l = groups; l; l = l->next) { - purple_debug_info("jabber", "jabber_roster_update(%s): [Source: grps]: groups contains %s", - name, (const char *)l->data); + out = g_string_append(out, (const char *)l->data); + if (l->next) + out = g_string_append(out, ", "); } + purple_debug_info("jabber", "jabber_roster_update(%s): [Source: grps]: groups: %s\n", + name, out->str); + g_string_free(out, TRUE); + } else { GSList *buddies = purple_find_buddies(js->gc->account, name); + GString *out = g_string_new(NULL); + if(!buddies) return; while(buddies) { @@ -299,9 +308,14 @@ buddies = g_slist_remove(buddies, b); } for (l = groups; l; l = l->next) { - purple_debug_info("jabber", "jabber_roster_update(%s): [Source: local blist]: groups contains %s", - name, (const char *)l->data); + out = g_string_append(out, (const char *)l->data); + if (l->next) + out = g_string_append(out, ", "); } + + purple_debug_info("jabber", "jabber_roster_update(%s): [Source: local blist]: groups: %s\n", + name, out->str); + g_string_free(out, TRUE); } iq = jabber_iq_new_query(js, JABBER_IQ_SET, "jabber:iq:roster"); @@ -349,6 +363,9 @@ jb = jabber_buddy_find(js, name, FALSE); + purple_debug_info("jabber", "jabber_roster_add_buddy(): Adding %s\n", + name); + jabber_roster_update(js, who, NULL); my_bare_jid = g_strdup_printf("%s@%s", js->user->node, js->user->domain); @@ -378,7 +395,7 @@ if(b != NULL) { purple_blist_alias_buddy(b, alias); - purple_debug_info("jabber", "jabber_roster_alias_change(): Aliased %s to %s", + purple_debug_info("jabber", "jabber_roster_alias_change(): Aliased %s to %s\n", name, alias); jabber_roster_update(gc->proto_data, name, NULL); @@ -408,8 +425,8 @@ buddies = g_slist_remove(buddies, b); } - purple_debug_info("jabber", "jabber_roster_group_change(): Moving %s from %s to %s", - name, old_group, new_group); + purple_debug_info("jabber", "jabber_roster_group_change(): Moving %s from %s to %s\n", + name, old_group, new_group); jabber_roster_update(gc->proto_data, name, groups); g_slist_free(groups); @@ -444,8 +461,8 @@ buddies = g_slist_remove(buddies, tmpbuddy); } - purple_debug_info("jabber", "jabber_roster_remove_buddy(): Removing %s", - buddy->name); + purple_debug_info("jabber", "jabber_roster_remove_buddy(): Removing %s from %s\n", + purple_buddy_get_name(buddy), purple_group_get_name(group)); jabber_roster_update(gc->proto_data, name, groups); g_slist_free(groups); @@ -458,6 +475,9 @@ xmlnode_set_attrib(item, "jid", name); xmlnode_set_attrib(item, "subscription", "remove"); + purple_debug_info("jabber", "jabber_roster_remove_buddy(): Removing %s\n", + purple_buddy_get_name(buddy)); + jabber_iq_send(iq); } }