static void house_keeping (void) { #ifdef TCB_MEMHASH /* free malloc'd int values on the agent list */ if (conf.list_agents) free_agent_list (); #endif /* REVERSE DNS THREAD */ pthread_mutex_lock (&gdns_thread.mutex); /* kill dns pthread */ active_gdns = 0; free_holder (&holder); gdns_free_queue (); /* free uniqmap */ #if defined(TCB_BTREE) || defined(TCB_MEMHASH) /*for (module = 0; module < TOTAL_MODULES; module++) { */ /*free_db_key (get_storage_metric (module, MTRC_UNIQMAP)); */ /*} */ #endif free_storage (); pthread_mutex_unlock (&gdns_thread.mutex); /* DASHBOARD */ if (dash && !conf.output_html) { free_dashboard (dash); reset_find (); } /* GEOLOCATION */ #ifdef HAVE_LIBGEOIP if (geo_location_data != NULL) GeoIP_delete (geo_location_data); #endif /* LOGGER */ free (logger); /* INVALID REQUESTS */ if (conf.invalid_requests_log) { LOG_DEBUG (("Closing invalid requests log.\n")); invalid_log_close (); } /* CONFIGURATION */ if (conf.debug_log) { LOG_DEBUG (("Bye.\n")); dbg_log_close (); } /* free colors */ free_color_lists (); /* free cmd arguments */ free_cmd_args (); }
/* get selected scheme */ static void scheme_chosen (const char *name) { int force = 0; free_color_lists (); if (strcmp ("Green/Original", name) == 0) { conf.color_scheme = STD_GREEN; force = 1; } else if (strcmp ("Monochrome/Default", name) == 0) { conf.color_scheme = MONOCHROME; force = 1; } else if (strcmp ("Custom Scheme", name) == 0) { force = 0; } init_colors (force); }