static void server_stop(void) { #ifdef HAVE_DB db_close(); #endif analy_stop(); monitor_stop(); log_stop(); kill_close(); match_close(); spam_close(); }
/** * Watcher callback, invoked when the file from which we read the spam * changed. */ static void spam_changed(const char *filename, gpointer unused_udata) { FILE *f; (void) unused_udata; f = file_fopen(filename, "r"); if (f) { char buf[80]; gulong count; spam_close(); count = spam_load(f); fclose(f); gm_snprintf(buf, sizeof(buf), "Reloaded %lu spam items.", count); gcu_statusbar_message(buf); } }