summaryrefslogtreecommitdiff
path: root/src/redismodule.h
diff options
context:
space:
mode:
authorYaacovHazan <31382944+YaacovHazan@users.noreply.github.com>2021-03-04 13:02:23 +0200
committerGitHub <noreply@github.com>2021-03-04 13:02:23 +0200
commitac91822952c512f6881d79fdbf2106e609f5cb0e (patch)
treed3207524a1d743fced5bd3dd8c1bcd8b0b444aff /src/redismodule.h
parentea1b48bd12d4cbd6634e5a478da99c6a1f14be8e (diff)
downloadredis-ac91822952c512f6881d79fdbf2106e609f5cb0e.tar.gz
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
Diffstat (limited to 'src/redismodule.h')
-rw-r--r--src/redismodule.h2
1 files changed, 1 insertions, 1 deletions
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;