}
}
}
+ else if (reply->type == REDIS_REPLY_ERROR) {
+ msg_err_redis_session ("fuzzy backend redis error: \"%s\"",
+ reply->str);
+ }
if (session->callback.cb_check) {
session->callback.cb_check (&rep, session->cbdata);
}
}
}
+ else if (reply->type == REDIS_REPLY_ERROR) {
+ msg_err_redis_session ("fuzzy backend redis error: \"%s\"",
+ reply->str);
+ }
if (found_elts < 2) {
if (session->cmd->shingles_count > 0 && !session->shingles_checked) {
}
}
else {
+ if (reply->type == REDIS_REPLY_ERROR) {
+ msg_err_redis_session ("fuzzy backend redis error: \"%s\"",
+ reply->str);
+ }
if (session->callback.cb_count) {
session->callback.cb_count (0, session->cbdata);
}
}
}
else {
+ if (reply->type == REDIS_REPLY_ERROR) {
+ msg_err_redis_session ("fuzzy backend redis error: \"%s\"",
+ reply->str);
+ }
if (session->callback.cb_version) {
session->callback.cb_version (0, session->cbdata);
}
}
}
else {
+ if (reply->type == REDIS_REPLY_ERROR) {
+ msg_err_redis_session ("fuzzy backend redis error: \"%s\"",
+ reply->str);
+ }
if (session->callback.cb_update) {
session->callback.cb_update (FALSE, 0, 0, 0, 0, session->cbdata);
}
}
}
else {
- msg_err_task_check ("got invalid reply from redis: %s, array expected",
- rspamd_redis_type_to_string (reply->type));
+ if (reply->type == REDIS_REPLY_ERROR) {
+ msg_err_task_check ("cannot learn %s: redis error: \"%s\"",
+ rt->stcf->symbol, reply->str);
+ }
+ else {
+ msg_err_task_check ("got invalid reply from redis: %s, array expected",
+ rspamd_redis_type_to_string(reply->type));
+ }
}
msg_debug_stat_redis ("received tokens for %s: %d processed, %d found",
}
else {
if (reply->type != REDIS_REPLY_NIL) {
- msg_err_task ("bad learned type for %s: %s, nil expected",
- rt->stcf->symbol,
- rspamd_redis_type_to_string (reply->type));
+ if (reply->type == REDIS_REPLY_ERROR) {
+ msg_err_task ("cannot learn %s: redis error: \"%s\"",
+ rt->stcf->symbol, reply->str);
+ }
+ else {
+ msg_err_task ("bad learned type for %s: %s, nil expected",
+ rt->stcf->symbol,
+ rspamd_redis_type_to_string(reply->type));
+ }
}
val = 0;
rspamd_strtol (reply->str, reply->len, &val);
}
else {
- if (reply->type != REDIS_REPLY_NIL) {
+ if (reply->type == REDIS_REPLY_ERROR) {
+ msg_err_task ("cannot learn %s: redis error: \"%s\"",
+ rt->ctx->stcf->symbol, reply->str);
+ }
+ else if (reply->type != REDIS_REPLY_NIL) {
msg_err_task ("bad learned type for %s: %d",
rt->ctx->stcf->symbol, reply->type);
}