diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-07-05 16:18:55 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-07-05 16:18:55 +0100 |
commit | 3a0280eca85f656f74c9a13b94e4a39df1085d29 (patch) | |
tree | 16f2d88b3ec2b677b02d1d885ca63d2626f240b6 /src | |
parent | d4c4a09b116c48f865dbcc6787d7fa3079d7d0a3 (diff) | |
download | rspamd-3a0280eca85f656f74c9a13b94e4a39df1085d29.tar.gz rspamd-3a0280eca85f656f74c9a13b94e4a39df1085d29.zip |
[Minor] Improve logging of the unknown settings id
Diffstat (limited to 'src')
-rw-r--r-- | src/libserver/protocol.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/libserver/protocol.c b/src/libserver/protocol.c index 4f854328f..bef7a0452 100644 --- a/src/libserver/protocol.c +++ b/src/libserver/protocol.c @@ -488,8 +488,20 @@ rspamd_protocol_handle_headers (struct rspamd_task *task, task->cfg, hv_tok->begin, hv_tok->len); if (task->settings_elt == NULL) { - msg_warn_protocol ("unknown settings id: %V", - hv); + GString *known_ids = g_string_new (NULL); + struct rspamd_config_settings_elt *cur; + + DL_FOREACH (task->cfg->setting_ids, cur) { + rspamd_printf_gstring (known_ids, "%s(%ud);", + cur->name, cur->id); + } + + msg_warn_protocol ("unknown settings id: %V(%d); known_ids: %v", + hv, + rspamd_config_name_to_id (hv_tok->begin, hv_tok->len), + known_ids); + + g_string_free (known_ids, TRUE); } else { msg_debug_protocol ("applied settings id %V -> %ud", hv, |