Mercurial > pidgin.yaz
comparison libpurple/protocols/jabber/google.c @ 28001:19d283331b9d
Fix a small leak and remove a duplicate xmlnode_set_attrib.
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Wed, 22 Jul 2009 19:48:51 +0000 |
parents | a12574d982a1 |
children | 0754698c49f4 7f1caec89081 |
comparison
equal
deleted
inserted
replaced
27999:99baf778e0b9 | 28001:19d283331b9d |
---|---|
980 void jabber_google_roster_outgoing(JabberStream *js, xmlnode *query, xmlnode *item) | 980 void jabber_google_roster_outgoing(JabberStream *js, xmlnode *query, xmlnode *item) |
981 { | 981 { |
982 PurpleAccount *account = purple_connection_get_account(js->gc); | 982 PurpleAccount *account = purple_connection_get_account(js->gc); |
983 GSList *list = account->deny; | 983 GSList *list = account->deny; |
984 const char *jid = xmlnode_get_attrib(item, "jid"); | 984 const char *jid = xmlnode_get_attrib(item, "jid"); |
985 char *jid_norm = g_strdup(jabber_normalize(account, jid)); | 985 char *jid_norm = jabber_normalize(account, jid); |
986 | 986 |
987 while (list) { | 987 while (list) { |
988 if (!strcmp(jid_norm, (char*)list->data)) { | 988 if (!strcmp(jid_norm, (char*)list->data)) { |
989 xmlnode_set_attrib(query, "xmlns:gr", "google:roster"); | 989 xmlnode_set_attrib(query, "xmlns:gr", "google:roster"); |
990 xmlnode_set_attrib(query, "gr:ext", "2"); | |
990 xmlnode_set_attrib(item, "gr:t", "B"); | 991 xmlnode_set_attrib(item, "gr:t", "B"); |
991 xmlnode_set_attrib(query, "xmlns:gr", "google:roster"); | |
992 xmlnode_set_attrib(query, "gr:ext", "2"); | |
993 return; | 992 return; |
994 } | 993 } |
995 list = list->next; | 994 list = list->next; |
996 } | 995 } |
997 | |
998 g_free(jid_norm); | |
999 | |
1000 } | 996 } |
1001 | 997 |
1002 gboolean jabber_google_roster_incoming(JabberStream *js, xmlnode *item) | 998 gboolean jabber_google_roster_incoming(JabberStream *js, xmlnode *item) |
1003 { | 999 { |
1004 PurpleAccount *account = purple_connection_get_account(js->gc); | 1000 PurpleAccount *account = purple_connection_get_account(js->gc); |