diff options
Diffstat (limited to 'redis_commands.c')
-rw-r--r-- | redis_commands.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/redis_commands.c b/redis_commands.c index db854738..c77ff31e 100644 --- a/redis_commands.c +++ b/redis_commands.c @@ -1251,6 +1251,15 @@ static int gen_varkey_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock, return SUCCESS; } +/* Generic handling of every blocking pop command (BLPOP, BZPOP[MIN/MAX], etc */ +int redis_varkey_timeout_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock, + char *kw, char **cmd, int *cmd_len, short *slot, + void **ctx) +{ + return gen_varkey_cmd(INTERNAL_FUNCTION_PARAM_PASSTHRU, redis_sock, kw, + strlen(kw), 2, 1, cmd, cmd_len, slot); +} + /* * Commands with specific signatures or that need unique functions because they * have specific processing (argument validation, etc) that make them unique @@ -3052,14 +3061,6 @@ int redis_blpop_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock, "BLPOP", sizeof("BLPOP")-1, 2, 1, cmd, cmd_len, slot); } -/* BRPOP */ -int redis_brpop_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock, - char **cmd, int *cmd_len, short *slot, void **ctx) -{ - return gen_varkey_cmd(INTERNAL_FUNCTION_PARAM_PASSTHRU, redis_sock, - "BRPOP", sizeof("BRPOP")-1, 1, 1, cmd, cmd_len, slot); -} - /* SINTER */ int redis_sinter_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock, char **cmd, int *cmd_len, short *slot, void **ctx) |