]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-9827 [mod_hiredis] handle NIL reply
authorChris Rienzo <chris.rienzo@citrix.com>
Wed, 7 Dec 2016 19:53:29 +0000 (14:53 -0500)
committerChris Rienzo <chris.rienzo@citrix.com>
Wed, 7 Dec 2016 19:53:29 +0000 (14:53 -0500)
src/mod/applications/mod_hiredis/hiredis_profile.c

index 86ec28a01f51ea59e57984f06f22a9fd6a3adf49..db7ce10bb6fa658ed218d8353446f5261ae1c9c6 100644 (file)
@@ -239,6 +239,9 @@ static switch_status_t hiredis_context_execute_sync(hiredis_context_t *context,
        case REDIS_REPLY_INTEGER:
                *resp = switch_mprintf("%lld", response->integer);
                break;
+       case REDIS_REPLY_NIL:
+               *resp = NULL;
+               break;
        case REDIS_REPLY_ERROR:
                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "hiredis: error response[%s][%d]\n", response->str, response->type);
                freeReplyObject(response);