diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-11-13 13:58:09 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-11-13 13:58:09 +0000 |
commit | 684996ee80c4b834f10c764a71a7f22dd2f23f83 (patch) | |
tree | 54ebf01447ac6fa4e693d00a952cda580884fd16 /src/libserver/fuzzy_backend_redis.c | |
parent | 54e835fc3540cc4dae025976fd15a0ad9cf10833 (diff) | |
download | rspamd-684996ee80c4b834f10c764a71a7f22dd2f23f83.tar.gz rspamd-684996ee80c4b834f10c764a71a7f22dd2f23f83.zip |
[Minor] Add failure reason in the upstreams code
Diffstat (limited to 'src/libserver/fuzzy_backend_redis.c')
-rw-r--r-- | src/libserver/fuzzy_backend_redis.c | 18 |
1 files changed, 9 insertions, 9 deletions
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) { |