Mercurial > ~mikael > mcabber > hg
diff mcabber/src/roster.c @ 192:62bc2992216b
[/trunk] Changeset 204 by mikael
* Correctly set "agent" type...
* Free all jidtodisp results with g_free()
* Bugfix: Make sure to strip resource part when adding a buddy
* Bugfix: do not treat users and agents separately (it can leads to 2 entries
with the same jid).
author | mikael |
---|---|
date | Fri, 06 May 2005 17:05:53 +0000 |
parents | aa5b635520ef |
children | 41fafa0ecfd8 |
line wrap: on
line diff
--- a/mcabber/src/roster.c Fri May 06 15:31:37 2005 +0000 +++ b/mcabber/src/roster.c Fri May 06 17:05:53 2005 +0000 @@ -74,8 +74,7 @@ roster sample; GCompareFunc comp; - if (!jidname) - return NULL; // should not happen + if (!jidname) return NULL; if (!roster_type) roster_type = ROSTER_TYPE_USER|ROSTER_TYPE_AGENT|ROSTER_TYPE_GROUP; @@ -139,8 +138,8 @@ if (!group) group = ""; // #1 Check this user doesn't already exist - if ((slist = roster_find(jid, jidsearch, type)) != NULL) - return slist; + slist = roster_find(jid, jidsearch, ROSTER_TYPE_USER|ROSTER_TYPE_AGENT); + if (slist) return slist; // #2 add group if necessary slist = roster_add_group(group); if (!slist) return NULL;