diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-07-26 18:24:26 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-07-26 18:24:26 +0400 |
commit | 0e88083420796af997f1af0396e4ea78ac235ba5 (patch) | |
tree | f46619cd9e156a69f2e82d5b8f5487bd92832076 /src/logger.c | |
parent | be47db1dd7a15f4c0f43b3230e245fdd525f840b (diff) | |
download | rspamd-0e88083420796af997f1af0396e4ea78ac235ba5.tar.gz rspamd-0e88083420796af997f1af0396e4ea78ac235ba5.zip |
* Turn off debug_ip during reload if it was disabled by new config
Diffstat (limited to 'src/logger.c')
-rw-r--r-- | src/logger.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/logger.c b/src/logger.c index 55a7f0fe5..4b04a93f1 100644 --- a/src/logger.c +++ b/src/logger.c @@ -246,6 +246,9 @@ rspamd_set_logger (enum rspamd_log_type type, enum process_type ptype, struct co /* Set up conditional logging */ if (cfg->debug_ip_map != NULL) { /* Try to add it as map first of all */ + if (rspamd_log->debug_ip) { + radix_tree_free (rspamd_log->debug_ip); + } rspamd_log->debug_ip = radix_tree_create (); if (!add_map (cfg->debug_ip_map, read_radix_list, fin_radix_list, (void **)&rspamd_log->debug_ip)) { /* Try to parse it as list */ @@ -277,6 +280,10 @@ rspamd_set_logger (enum rspamd_log_type type, enum process_type ptype, struct co g_strfreev (strvec); } } + else if (rspamd_log->debug_ip) { + radix_tree_free (rspamd_log->debug_ip); + rspamd_log->debug_ip = NULL; + } } int |