]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-8075 Fix for failover when you pull power on redis, while redis clients under...
authorWilliam King <william.king@quentustech.com>
Wed, 9 Sep 2015 17:39:00 +0000 (10:39 -0700)
committerWilliam King <william.king@quentustech.com>
Wed, 9 Sep 2015 17:39:20 +0000 (10:39 -0700)
src/mod/applications/mod_hiredis/hiredis_profile.c

index f83f5cf55f2f807b72a79dbf0b5538940d794c38..ab2d152e0c53d522c64cf16ab5699da7ad49210f 100644 (file)
@@ -143,6 +143,11 @@ switch_status_t hiredis_profile_execute_sync(hiredis_profile_t *profile, const c
        
        response = redisCommand(profile->conn->context, data);
 
+       if ( !response ) {
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "hiredis: empty response received\n");
+               return SWITCH_STATUS_GENERR;
+       }
+       
        switch(response->type) {
        case REDIS_REPLY_STATUS: /* fallthrough */
        case REDIS_REPLY_STRING: