WIP: feat/upstream-sync #104

Closed
jabber.developer2 wants to merge 54 commits from feat/upstream-sync into master
29 changed files with 568 additions and 164 deletions
Showing only changes of commit 56488dd2f9 - Show all commits

View File

@@ -261,6 +261,11 @@ api_get_current_occupants(void)
assert(mucwin->memcheck == PROFMUCWIN_MEMCHECK);
GList* occupants_list = muc_roster(mucwin->roomjid);
char** result = malloc((g_list_length(occupants_list) + 1) * sizeof(char*));
if (result == NULL) {
g_list_free(occupants_list);
return NULL;
}
GList* curr = occupants_list;
int i = 0;
while (curr) {
@@ -269,6 +274,9 @@ api_get_current_occupants(void)
curr = g_list_next(curr);
}
result[i] = NULL;
g_list_free(occupants_list);
return result;
} else {
return NULL;