diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-02-17 13:25:25 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-02-17 13:25:25 +0000 |
commit | 580011677c460165a0f3907879155a9a9d2b3891 (patch) | |
tree | cea9c5f4cdbd48072e4816d1f87a9500667f21aa /src/libstat | |
parent | 361fb6df11468548eb57856dad2e74b082dd7085 (diff) | |
download | rspamd-580011677c460165a0f3907879155a9a9d2b3891.tar.gz rspamd-580011677c460165a0f3907879155a9a9d2b3891.zip |
[Minor] Add routine to convert redis reply type to string
Issue: #1228
Diffstat (limited to 'src/libstat')
-rw-r--r-- | src/libstat/backends/redis_backend.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libstat/backends/redis_backend.c b/src/libstat/backends/redis_backend.c index e869f69ae..869ecad0f 100644 --- a/src/libstat/backends/redis_backend.c +++ b/src/libstat/backends/redis_backend.c @@ -767,8 +767,9 @@ rspamd_redis_connected (redisAsyncContext *c, gpointer r, gpointer priv) } else { if (reply->type != REDIS_REPLY_NIL) { - msg_err_task ("bad learned type for %s: %d", - rt->stcf->symbol, reply->type); + msg_err_task ("bad learned type for %s: %s, nil expected", + rt->stcf->symbol, + rspamd_redis_type_to_string (reply->type)); } val = 0; @@ -856,8 +857,8 @@ rspamd_redis_processed (redisAsyncContext *c, gpointer r, gpointer priv) } } else { - msg_err_task_check ("got invalid reply from redis: %d", - reply->type); + msg_err_task_check ("got invalid reply from redis: %s, array expected", + rspamd_redis_type_to_string (reply->type)); } msg_debug_task_check ("received tokens for %s: %d processed, %d found", |