static void recursive_alias_expand (const char *name, mu_list_t exlist, mu_list_t origlist) { alias_t al; mu_iterator_t itr; if ((al = alias_lookup (name)) == NULL) { if (mu_list_locate (exlist, (void*)name, NULL) == MU_ERR_NOENT) mu_list_append (exlist, (void*)name); return; } mu_list_get_iterator (al->list, &itr); for (mu_iterator_first (itr); !mu_iterator_is_done (itr); mu_iterator_next (itr)) { char *word; mu_iterator_current (itr, (void **)&word); if (mu_list_locate (origlist, word, NULL) == MU_ERR_NOENT) { mu_list_prepend (origlist, word); recursive_alias_expand (word, exlist, origlist); mu_list_remove (origlist, word); } } mu_iterator_destroy (&itr); }
int mu_unregistrar_record (mu_record_t record) { mu_list_t list; _registrar_get_list (&list); mu_list_remove (list, record); return 0; }
static void remop (compfun comp) { struct rem_data d; d.comp = comp; d.op = NULL; mu_list_do (oplist, rem_action, &d); mu_list_remove (oplist, d.op); }
/* The folder is destroy if it is the last reference. */ void mu_folder_destroy (mu_folder_t *pfolder) { if (pfolder && *pfolder) { mu_folder_t folder = *pfolder; int destroy_lock = 0; mu_monitor_t monitor = folder->monitor; mu_monitor_wrlock (monitor); /* Check if this the last reference for this folder. If yes removed it from the list. */ mu_monitor_wrlock (&folder_lock); folder->ref--; /* Remove the folder from the list of known folder. */ if (folder->ref <= 0) mu_list_remove (known_folder_list, folder); /* If the list is empty we can safely remove it. */ if (mu_list_is_empty (known_folder_list)) mu_list_destroy (&known_folder_list); mu_monitor_unlock (&folder_lock); if (folder->ref <= 0) { mu_monitor_unlock (monitor); destroy_lock = 1; /* Notify the observers. */ if (folder->observable) { mu_observable_notify (folder->observable, MU_EVT_FOLDER_DESTROY, folder); mu_observable_destroy (&folder->observable, folder); } if (folder->_destroy) folder->_destroy (folder); mu_monitor_wrlock (monitor); if (folder->authority) mu_authority_destroy (&folder->authority, folder); if (folder->url) mu_url_destroy (&folder->url); if (folder->property) mu_property_destroy (&folder->property); free (folder); } mu_monitor_unlock (monitor); if (destroy_lock) mu_monitor_destroy (&monitor, folder); *pfolder = NULL; } }
void _mu_sv_instr_pop (mu_sieve_machine_t mach) { if (INSTR_DEBUG (mach)) { mu_sieve_debug (mach, "%4lu: POP\n", (unsigned long)(mach->pc - 1)); if (INSTR_DISASS (mach)) return; } if (!mach->stack || mu_list_is_empty (mach->stack)) { mu_sieve_error (mach, _("stack underflow")); mu_sieve_abort (mach); } mu_list_get (mach->stack, 0, (void **)&mach->reg); mu_list_remove (mach->stack, (void *)mach->reg); }
void auth_remove (char *name) { mu_list_remove (imap_auth_list, (void*) name); }
void imap4d_capability_remove (const char *str) { mu_list_remove (capa_list, (void*)str); }