- store_accounts =
- tny_account_store_iface_get_store_accounts (account_store);
-
- for (iter = store_accounts; iter; iter = iter->next) {
- modest_tny_store_actions_update_folders (TNY_STORE_ACCOUNT_IFACE (iter->data));
-
+ tny_account_store_iface_get_accounts (account_store, store_accounts,
+ TNY_ACCOUNT_STORE_IFACE_STORE_ACCOUNTS);
+ iter = tny_list_iface_create_iterator (store_accounts);
+
+ while (!tny_iterator_iface_is_done(iter)) {
+ modest_tny_store_actions_update_folders
+ (TNY_STORE_ACCOUNT_IFACE (tny_iterator_iface_current(iter)));
+ tny_iterator_iface_next (iter);