diff options
Diffstat (limited to 'src/libserver')
-rw-r--r-- | src/libserver/dns.c | 6 | ||||
-rw-r--r-- | src/libserver/fuzzy_backend_redis.c | 18 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/libserver/dns.c b/src/libserver/dns.c index 71b8adf9f..505e44a7a 100644 --- a/src/libserver/dns.c +++ b/src/libserver/dns.c @@ -36,7 +36,7 @@ static struct rdns_upstream_elt* rspamd_dns_select_upstream_retransmit ( static void rspamd_dns_upstream_ok (struct rdns_upstream_elt *elt, void *ups_data); static void rspamd_dns_upstream_fail (struct rdns_upstream_elt *elt, - void *ups_data); + void *ups_data, const gchar *reason); static unsigned int rspamd_dns_upstream_count (void *ups_data); static struct rdns_upstream_context rspamd_ups_ctx = { @@ -852,11 +852,11 @@ rspamd_dns_upstream_ok (struct rdns_upstream_elt *elt, static void rspamd_dns_upstream_fail (struct rdns_upstream_elt *elt, - void *ups_data) + void *ups_data, const gchar *reason) { struct upstream *up = elt->lib_data; - rspamd_upstream_fail (up, FALSE); + rspamd_upstream_fail (up, FALSE, reason); } static unsigned int diff --git a/src/libserver/fuzzy_backend_redis.c b/src/libserver/fuzzy_backend_redis.c index ed0813edf..7070773b3 100644 --- a/src/libserver/fuzzy_backend_redis.c +++ b/src/libserver/fuzzy_backend_redis.c @@ -444,7 +444,7 @@ rspamd_fuzzy_redis_shingles_callback (redisAsyncContext *c, gpointer r, msg_err_redis_session ("error getting shingles: %s", c->errstr); } - rspamd_upstream_fail (session->up, FALSE); + rspamd_upstream_fail (session->up, FALSE, strerror (errno)); } rspamd_fuzzy_redis_session_dtor (session, FALSE); @@ -582,7 +582,7 @@ rspamd_fuzzy_redis_check_callback (redisAsyncContext *c, gpointer r, msg_err_redis_session ("error getting hashes: %s", c->errstr); } - rspamd_upstream_fail (session->up, FALSE); + rspamd_upstream_fail (session->up, FALSE, strerror (errno)); } rspamd_fuzzy_redis_session_dtor (session, FALSE); @@ -651,7 +651,7 @@ rspamd_fuzzy_backend_check_redis (struct rspamd_fuzzy_backend *bk, rspamd_inet_address_get_port (addr)); if (session->ctx == NULL) { - rspamd_upstream_fail (up, TRUE); + rspamd_upstream_fail (up, TRUE, strerror (errno)); rspamd_fuzzy_redis_session_dtor (session, TRUE); if (cb) { @@ -721,7 +721,7 @@ rspamd_fuzzy_redis_count_callback (redisAsyncContext *c, gpointer r, msg_err_redis_session ("error getting count: %s", c->errstr); } - rspamd_upstream_fail (session->up, FALSE); + rspamd_upstream_fail (session->up, FALSE, strerror (errno)); } rspamd_fuzzy_redis_session_dtor (session, FALSE); @@ -776,7 +776,7 @@ rspamd_fuzzy_backend_count_redis (struct rspamd_fuzzy_backend *bk, rspamd_inet_address_get_port (addr)); if (session->ctx == NULL) { - rspamd_upstream_fail (up, TRUE); + rspamd_upstream_fail (up, TRUE, strerror (errno)); rspamd_fuzzy_redis_session_dtor (session, TRUE); if (cb) { @@ -844,7 +844,7 @@ rspamd_fuzzy_redis_version_callback (redisAsyncContext *c, gpointer r, msg_err_redis_session ("error getting version: %s", c->errstr); } - rspamd_upstream_fail (session->up, FALSE); + rspamd_upstream_fail (session->up, FALSE, strerror (errno)); } rspamd_fuzzy_redis_session_dtor (session, FALSE); @@ -900,7 +900,7 @@ rspamd_fuzzy_backend_version_redis (struct rspamd_fuzzy_backend *bk, rspamd_inet_address_get_port (addr)); if (session->ctx == NULL) { - rspamd_upstream_fail (up, FALSE); + rspamd_upstream_fail (up, FALSE, strerror (errno)); rspamd_fuzzy_redis_session_dtor (session, TRUE); if (cb) { @@ -1334,7 +1334,7 @@ rspamd_fuzzy_redis_update_callback (redisAsyncContext *c, gpointer r, msg_err_redis_session ("error sending update to redis: %s", c->errstr); } - rspamd_upstream_fail (session->up, FALSE); + rspamd_upstream_fail (session->up, FALSE, strerror (errno)); } rspamd_fuzzy_redis_session_dtor (session, FALSE); @@ -1460,7 +1460,7 @@ rspamd_fuzzy_backend_update_redis (struct rspamd_fuzzy_backend *bk, rspamd_inet_address_get_port (addr)); if (session->ctx == NULL) { - rspamd_upstream_fail (up, TRUE); + rspamd_upstream_fail (up, TRUE, strerror (errno)); rspamd_fuzzy_redis_session_dtor (session, TRUE); if (cb) { |