--- a/mcabber/src/roster.c Fri Oct 21 23:13:54 2005 +0200
+++ b/mcabber/src/roster.c Wed Oct 26 23:46:53 2005 +0200
@@ -841,11 +841,16 @@
// buddy_getresources(roster_data)
// Return a singly-linked-list of resource names
// Note: the caller should free the list (and data) after use
+// If roster_data is null, the current buddy is selected
GSList *buddy_getresources(gpointer rosterdata)
{
roster *roster_usr = rosterdata;
GSList *reslist = NULL, *lp;
+ if (!roster_usr) {
+ if (!current_buddy) return NULL;
+ roster_usr = BUDDATA(current_buddy);
+ }
for (lp = roster_usr->resource; lp; lp = g_slist_next(lp))
reslist = g_slist_append(reslist, g_strdup(((res*)lp->data)->name));