# HG changeset patch # User Mikael Berthe # Date 1128541573 -7200 # Node ID 4a10c04ac2fbca9f0a184ed863de3526160c8186 # Parent 2ea7591584ab5235f2c571a086613977306e9356 Fix a bug in roster_find() diff -r 2ea7591584ab -r 4a10c04ac2fb mcabber/src/hooks.c --- a/mcabber/src/hooks.c Wed Oct 05 19:30:35 2005 +0200 +++ b/mcabber/src/hooks.c Wed Oct 05 21:46:13 2005 +0200 @@ -57,8 +57,7 @@ } // If this user isn't in the roster, we add it - roster_usr = roster_find(jid, jidsearch, - rtype|ROSTER_TYPE_AGENT|ROSTER_TYPE_ROOM); + roster_usr = roster_find(jid, jidsearch, 0); if (!roster_usr) { new_guy = TRUE; roster_usr = roster_add_user(jid, NULL, NULL, rtype); diff -r 2ea7591584ab -r 4a10c04ac2fb mcabber/src/roster.c --- a/mcabber/src/roster.c Wed Oct 05 19:30:35 2005 +0200 +++ b/mcabber/src/roster.c Wed Oct 05 21:46:13 2005 +0200 @@ -215,11 +215,9 @@ if (roster_type & ROSTER_TYPE_GROUP) { if ((type == namesearch) && !strcasecmp(jidname, roster_elt->name)) return sl_roster_elt; - } else { - res = g_slist_find_custom(roster_elt->list, &sample, comp); - if (res) - return res; } + res = g_slist_find_custom(roster_elt->list, &sample, comp); + if (res) return res; sl_roster_elt = g_slist_next(sl_roster_elt); } return NULL;