]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
changed init logic of redis backend as per review request 206/head
authorTalkabout <talk.about@gmx.de>
Wed, 1 Apr 2020 11:32:13 +0000 (13:32 +0200)
committerTalkabout <talk.about@gmx.de>
Wed, 1 Apr 2020 11:32:13 +0000 (13:32 +0200)
cachedb/redis.c

index dbdd9c3f41a1c96e582a5b340b9cb77eeb67b2ee..6fc5496d660c3463deda158f862c28b76e3df130 100644 (file)
@@ -130,12 +130,12 @@ redis_init(struct module_env* env, struct cachedb_env* cachedb_env)
                redis_reply_type = rep->type;
                freeReplyObject(rep);
                switch (redis_reply_type) {
-               case REDIS_REPLY_ERROR:
+               case REDIS_REPLY_STATUS:
+                       break;
+               default:
                        /** init failed, setex command not supported */
                        log_err("redis_init: failed to init redis, the redis-expire-records option requires the SETEX command (redis >= 2.0.0)");
                        return 0;
-               default:
-                       break;
                }
        }