diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-01-04 13:59:56 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-01-04 13:59:56 +0000 |
commit | 2d1e80497f378d2cdcb9fa44a92d085af15fdafe (patch) | |
tree | 1570bf82f8a5ae839a02247c38d6f1aca921798e | |
parent | d315a3368c65a0246b7c863e075013eb0d09bdc9 (diff) | |
download | rspamd-2d1e80497f378d2cdcb9fa44a92d085af15fdafe.tar.gz rspamd-2d1e80497f378d2cdcb9fa44a92d085af15fdafe.zip |
Improve hyperscan compiler helper logging
-rw-r--r-- | src/hs_helper.c | 10 | ||||
-rw-r--r-- | src/libserver/re_cache.c | 4 |
2 files changed, 10 insertions, 4 deletions
diff --git a/src/hs_helper.c b/src/hs_helper.c index d8ffd9e01..260d26674 100644 --- a/src/hs_helper.c +++ b/src/hs_helper.c @@ -32,8 +32,6 @@ #ifdef HAVE_GLOB_H #include <glob.h> -#include <libserver/rspamd_control.h> - #endif static gpointer init_hs_helper (struct rspamd_config *cfg); @@ -91,6 +89,14 @@ init_hs_helper (struct rspamd_config *cfg) G_STRUCT_OFFSET (struct hs_helper_ctx, max_time), RSPAMD_CL_FLAG_TIME_FLOAT, "Maximum time to wait for compilation of a single expression"); + rspamd_rcl_register_worker_option (cfg, + type, + "timeout", + rspamd_rcl_parse_struct_time, + ctx, + G_STRUCT_OFFSET (struct hs_helper_ctx, max_time), + RSPAMD_CL_FLAG_TIME_FLOAT, + "Maximum time to wait for compilation of a single expression"); return ctx; } diff --git a/src/libserver/re_cache.c b/src/libserver/re_cache.c index 6b86dc9e0..e9a18cfdd 100644 --- a/src/libserver/re_cache.c +++ b/src/libserver/re_cache.c @@ -985,7 +985,7 @@ rspamd_re_cache_is_finite (struct rspamd_re_cache *cache, return TRUE; } else { - msg_info_re_cache ( + msg_err_re_cache ( "cannot approximate %s to hyperscan", rspamd_regexp_get_pattern (re)); @@ -996,7 +996,7 @@ rspamd_re_cache_is_finite (struct rspamd_re_cache *cache, /* We consider that as timeout */ kill (cld, SIGKILL); g_assert (waitpid (cld, &status, 0) != -1); - msg_info_re_cache ( + msg_err_re_cache ( "cannot approximate %s to hyperscan: timeout waiting", rspamd_regexp_get_pattern (re)); signal (SIGCHLD, SIG_IGN); |