summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-08-28 15:47:25 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-08-28 15:47:25 +0100
commit89464848ef66c8bc4e9417572580570eb9555564 (patch)
treefbce623e7cc1a9a2026424c286bd3884df5d29ec
parent43854347f4b2abbcf7da7702eddf5333df4c9b2f (diff)
downloadrspamd-89464848ef66c8bc4e9417572580570eb9555564.tar.gz
rspamd-89464848ef66c8bc4e9417572580570eb9555564.zip
Fix rdns logger.
-rw-r--r--src/libserver/dns.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/libserver/dns.c b/src/libserver/dns.c
index 3c6a3efe6..b0394edba 100644
--- a/src/libserver/dns.c
+++ b/src/libserver/dns.c
@@ -150,6 +150,19 @@ gboolean make_dns_request_task (struct rspamd_task *task,
return ret;
}
+static void rspamd_rnds_log_bridge (
+ void *log_data,
+ enum rdns_log_level level,
+ const char *function,
+ const char *format,
+ va_list args)
+{
+ rspamd_logger_t *logger = log_data;
+
+ rspamd_common_logv (logger, (GLogLevelFlags)level, "rdns", NULL,
+ function, format, args);
+}
+
struct rspamd_dns_resolver *
dns_resolver_init (rspamd_logger_t *logger,
struct event_base *ev_base,
@@ -177,8 +190,8 @@ dns_resolver_init (rspamd_logger_t *logger,
if (cfg != NULL) {
rdns_resolver_set_log_level (new->r, cfg->log_level);
}
- rspamd_common_logv (new->r, (rdns_log_function) rspamd_common_logv, NULL,
- NULL, logger, NULL, NULL);
+
+ rdns_resolver_set_logger (new->r, rspamd_rnds_log_bridge, logger);
if (cfg == NULL || cfg->nameservers == NULL) {
/* Parse resolv.conf */