redismodule.h: Check ModuleNameBusy before calling it

Older versions might not have this function.
This commit is contained in:
Mark Nunberg
2018-01-23 10:49:18 -05:00
committed by antirez
parent 05c1f18d6a
commit ba2d3e8e6e

View File

@ -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;
}