FS-9827 [mod_hiredis] handle NIL reply
This commit is contained in:
parent
12483d5ee3
commit
7077819039
|
@ -218,6 +218,9 @@ static switch_status_t hiredis_context_execute_sync(hiredis_context_t *context,
|
||||||
case REDIS_REPLY_INTEGER:
|
case REDIS_REPLY_INTEGER:
|
||||||
*resp = switch_mprintf("%lld", response->integer);
|
*resp = switch_mprintf("%lld", response->integer);
|
||||||
break;
|
break;
|
||||||
|
case REDIS_REPLY_NIL:
|
||||||
|
*resp = NULL;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "hiredis: response error[%s][%d]\n", response->str, response->type);
|
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "hiredis: response error[%s][%d]\n", response->str, response->type);
|
||||||
freeReplyObject(response);
|
freeReplyObject(response);
|
||||||
|
|
Loading…
Reference in New Issue