From ac91822952c512f6881d79fdbf2106e609f5cb0e Mon Sep 17 00:00:00 2001 From: YaacovHazan <31382944+YaacovHazan@users.noreply.github.com> Date: Thu, 4 Mar 2021 13:02:23 +0200 Subject: [PATCH] Fix RedisModule_IsAOFClient Redis Module API (#8596) Since the API declared (as #define) in redismodule.h and uses the CLIENT_ID_AOF that declared in the server.h, when a module will want to make use of this API, it will get a compilation error (module doesn't include the server.h). The API was broken by d6eb3af (failed attempt for a cleanup). Revert to the original version of RedisModule_IsAOFClient that uses UINT64_MAX instead of CLIENT_ID_AOF --- src/redismodule.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/redismodule.h b/src/redismodule.h index ea271b82b..e590ec48d 100644 --- a/src/redismodule.h +++ b/src/redismodule.h @@ -835,7 +835,7 @@ REDISMODULE_API int (*RedisModule_DefragCursorSet)(RedisModuleDefragCtx *ctx, un REDISMODULE_API int (*RedisModule_DefragCursorGet)(RedisModuleDefragCtx *ctx, unsigned long *cursor) REDISMODULE_ATTR; #endif -#define RedisModule_IsAOFClient(id) ((id) == CLIENT_ID_AOF) +#define RedisModule_IsAOFClient(id) ((id) == UINT64_MAX) /* This is included inline inside each Redis module. */ static int RedisModule_Init(RedisModuleCtx *ctx, const char *name, int ver, int apiver) REDISMODULE_ATTR_UNUSED;