void stop_monitors() { GSList *item; watcher_t *watcher; if (!app->started) { LOG_INFO("%s", N_("watchers already stopped")); return; } LOG_INFO("%s", N_("stopping watchers")); mount_destroy(); LOG_INFO("%s", N_("mount watcher stopped")); for (item = app->watchers; item; item = item->next) { watcher = (watcher_t *) item->data; watcher_destroy_monitors(watcher); LOG_INFO("%s: %s", watcher->name, N_("watcher stopped")); } app->started = FALSE; }
static void server_destroy (server_t **self_p) { assert (self_p); if (*self_p) { server_t *self = *self_p; zsocket_destroy (self->ctx, self->router); zconfig_destroy (&self->config); zhash_destroy (&self->clients); // Destroy mount points while (zlist_size (self->mounts)) { mount_t *mount = (mount_t *) zlist_pop (self->mounts); mount_destroy (&mount); } zlist_destroy (&self->mounts); free (self); *self_p = NULL; } }