--- 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;