mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 08:38:27 -05:00
redismodule.h: Check ModuleNameBusy before calling it
Older versions might not have this function.
This commit is contained in:
parent
727dd43614
commit
062bd733da
@ -374,7 +374,7 @@ static int RedisModule_Init(RedisModuleCtx *ctx, const char *name, int ver, int
|
|||||||
REDISMODULE_GET_API(AbortBlock);
|
REDISMODULE_GET_API(AbortBlock);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (RedisModule_IsModuleNameBusy(name)) return REDISMODULE_ERR;
|
if (RedisModule_IsModuleNameBusy && RedisModule_IsModuleNameBusy(name)) return REDISMODULE_ERR;
|
||||||
RedisModule_SetModuleAttribs(ctx,name,ver,apiver);
|
RedisModule_SetModuleAttribs(ctx,name,ver,apiver);
|
||||||
return REDISMODULE_OK;
|
return REDISMODULE_OK;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user