diff options
author | James Booth <boothj5@gmail.com> | 2013-08-26 14:52:14 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2013-08-26 14:52:14 +0100 |
commit | 080515fe85090d1fb1d7bbeec049755e228df790 (patch) | |
tree | 9db06e49352e275de151b22353644450ad03bd3a /src/xmpp/roster.c | |
parent | 550071afded1464dc04cba856bed4687a8a968a4 (diff) | |
parent | 70bbc2e34474d9a466707d90c5d56666cf27b3ae (diff) | |
download | profani-tty-080515fe85090d1fb1d7bbeec049755e228df790.tar.gz |
Merge branch 'master' into otr
Diffstat (limited to 'src/xmpp/roster.c')
-rw-r--r-- | src/xmpp/roster.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/xmpp/roster.c b/src/xmpp/roster.c index b31a2725..c073464d 100644 --- a/src/xmpp/roster.c +++ b/src/xmpp/roster.c @@ -184,12 +184,12 @@ roster_add(const char * const barejid, const char * const name, GSList *groups, // add groups while (groups != NULL) { - autocomplete_add(groups_ac, strdup(groups->data)); + autocomplete_add(groups_ac, groups->data); groups = g_slist_next(groups); } g_hash_table_insert(contacts, strdup(barejid), contact); - autocomplete_add(barejid_ac, strdup(barejid)); + autocomplete_add(barejid_ac, barejid); _add_name_and_barejid(name, barejid); if (!from_initial) { @@ -226,7 +226,7 @@ roster_update(const char * const barejid, const char * const name, // add groups while (groups != NULL) { - autocomplete_add(groups_ac, strdup(groups->data)); + autocomplete_add(groups_ac, groups->data); groups = g_slist_next(groups); } } @@ -248,7 +248,7 @@ roster_update_presence(const char * const barejid, Resource *resource, } p_contact_set_presence(contact, resource); Jid *jid = jid_create_from_bare_and_resource(barejid, resource->name); - autocomplete_add(fulljid_ac, strdup(jid->fulljid)); + autocomplete_add(fulljid_ac, jid->fulljid); jid_destroy(jid); return TRUE; @@ -646,10 +646,10 @@ static void _add_name_and_barejid(const char * const name, const char * const barejid) { if (name != NULL) { - autocomplete_add(name_ac, strdup(name)); + autocomplete_add(name_ac, name); g_hash_table_insert(name_to_barejid, strdup(name), strdup(barejid)); } else { - autocomplete_add(name_ac, strdup(barejid)); + autocomplete_add(name_ac, barejid); g_hash_table_insert(name_to_barejid, strdup(barejid), strdup(barejid)); } } |