KHMEXP khm_int32 KHMAPI khui_alert_release(khui_alert * alert) { assert(alert->magic == KHUI_ALERT_MAGIC); EnterCriticalSection(&cs_alerts); if((--(alert->refcount)) == 0) { free_alert(alert); } LeaveCriticalSection(&cs_alerts); return KHM_ERROR_SUCCESS; }
int Reload_EntryProc_Config( void *module_config ) { entry_proc_config_t *conf = ( entry_proc_config_t * ) module_config; if ( conf->nb_thread != entry_proc_conf.nb_thread ) DisplayLog( LVL_MAJOR, "EntryProc_Config", ENTRYPROC_CONFIG_BLOCK "::nb_threads changed in config file, but cannot be modified dynamically" ); if ( conf->max_pending_operations != entry_proc_conf.max_pending_operations ) DisplayLog( LVL_MAJOR, "EntryProc_Config", ENTRYPROC_CONFIG_BLOCK "::max_pending_operations changed in config file, but cannot be modified dynamically" ); if ( conf->match_classes != entry_proc_conf.match_classes ) { DisplayLog( LVL_MAJOR, "EntryProc_Config", ENTRYPROC_CONFIG_BLOCK"::match_classes updated: '%s'->'%s'", bool2str(entry_proc_conf.match_classes), bool2str(conf->match_classes) ); entry_proc_conf.match_classes = conf->match_classes; } /* Check alert rules */ update_alerts( entry_proc_conf.alert_list, entry_proc_conf.alert_count, conf->alert_list, conf->alert_count, ENTRYPROC_CONFIG_BLOCK ); free_alert( conf->alert_list, conf->alert_count ); if ( entry_proc_conf.match_classes && !is_class_defined() ) { DisplayLog( LVL_EVENT, "EntryProc_Config" , "No class defined in policies, disabling class matching." ); entry_proc_conf.match_classes = FALSE; } return 0; }