summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Nunberg <mnunberg@users.noreply.github.com>2018-01-23 10:49:18 -0500
committerGitHub <noreply@github.com>2018-01-23 10:49:18 -0500
commit062bd733da883d76d3625fb38c71f2bd74c363a1 (patch)
tree47ed1207233dd7427dac83bd2ca32b4487332783
parent727dd43614ec45e23e2dedbba08b393323feaa4f (diff)
downloadredis-062bd733da883d76d3625fb38c71f2bd74c363a1.tar.gz
redismodule.h: Check ModuleNameBusy before calling it
Older versions might not have this function.
-rw-r--r--src/redismodule.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/redismodule.h b/src/redismodule.h
index 374cde7f0..09d681c27 100644
--- a/src/redismodule.h
+++ b/src/redismodule.h
@@ -374,7 +374,7 @@ static int RedisModule_Init(RedisModuleCtx *ctx, const char *name, int ver, int
REDISMODULE_GET_API(AbortBlock);
#endif
- if (RedisModule_IsModuleNameBusy(name)) return REDISMODULE_ERR;
+ if (RedisModule_IsModuleNameBusy && RedisModule_IsModuleNameBusy(name)) return REDISMODULE_ERR;
RedisModule_SetModuleAttribs(ctx,name,ver,apiver);
return REDISMODULE_OK;
}