aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-08-31 21:24:49 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-08-31 21:25:07 +0100
commit2b872fd3c7cf6b5ca9defd4c7e025cf46816d0ff (patch)
tree1e5c058291d031db419848030a57954a8050cb08 /src
parent7a438186b0e1e95e79429e57100f6501ee44baa8 (diff)
downloadrspamd-2b872fd3c7cf6b5ca9defd4c7e025cf46816d0ff.tar.gz
rspamd-2b872fd3c7cf6b5ca9defd4c7e025cf46816d0ff.zip
[Fix] Fix exceptions list in surbl
Diffstat (limited to 'src')
-rw-r--r--src/plugins/surbl.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/plugins/surbl.c b/src/plugins/surbl.c
index 999a8c1c4..a44524e70 100644
--- a/src/plugins/surbl.c
+++ b/src/plugins/surbl.c
@@ -154,9 +154,22 @@ read_exceptions_list (gchar * chunk,
struct map_cb_data *data,
gboolean final)
{
+ GHashTable **t;
+ guint i;
+
if (data->cur_data == NULL) {
+ t = data->prev_data;
+
+ for (i = 0; i < MAX_LEVELS; i++) {
+ if (t[i] != NULL) {
+ g_hash_table_destroy (t[i]);
+ }
+ t[i] = NULL;
+ }
+
data->cur_data = data->prev_data;
}
+
return rspamd_parse_kv_list (
chunk,
len,
@@ -176,9 +189,12 @@ fin_exceptions_list (struct map_cb_data *data)
t = data->prev_data;
for (i = 0; i < MAX_LEVELS; i++) {
if (t[i] != NULL) {
- g_hash_table_destroy (t[i]);
+ rspamd_default_log_function (G_LOG_LEVEL_DEBUG,
+ "surbl", "",
+ G_STRFUNC,
+ "exceptions level %d: %d elements",
+ i, g_hash_table_size (t[i]));
}
- t[i] = NULL;
}
}
}