# HG changeset patch # User Sadrul Habib Chowdhury # Date 1120371170 0 # Node ID 6d2abb51e5867fdc3d68e58161a00632a8c1c8c2 # Parent c24e00c4ffd7055798bc713bce74c76c1465121f [gaim-migrate @ 12991] Patch 1231506 from sadrul "gaim_accounts_get_all_active functions is declared in src/account.h which should return a list of active (enabled) accounts, but it is not implemented anywhere. This patch implements the function." This implementation looks right. It works for him. Why not? committer: Richard Laager diff -r c24e00c4ffd7 -r 6d2abb51e586 src/account.c --- a/src/account.c Sun Jul 03 05:28:57 2005 +0000 +++ b/src/account.c Sun Jul 03 06:12:50 2005 +0000 @@ -24,6 +24,7 @@ */ #include "internal.h" #include "account.h" +#include "core.h" #include "debug.h" #include "notify.h" #include "pounce.h" @@ -1792,6 +1793,24 @@ return accounts; } +GList * +gaim_accounts_get_all_active(void) +{ + GList *list = NULL; + GList *all = gaim_accounts_get_all(); + + while (all != NULL) { + GaimAccount *account = all->data; + + if (gaim_account_get_enabled(account, gaim_core_get_ui())) + list = g_list_append(list, account); + + all = all->next; + } + + return list; +} + GaimAccount * gaim_accounts_find(const char *name, const char *protocol_id) {