Commit e443ad9c authored by Yossi Gottlieb's avatar Yossi Gottlieb Committed by antirez
Browse files

Log loadmodule dlopen() errors.

parent 85919f80
...@@ -1273,7 +1273,10 @@ int moduleLoad(const char *path) { ...@@ -1273,7 +1273,10 @@ int moduleLoad(const char *path) {
RedisModuleCtx ctx = REDISMODULE_CTX_INIT; RedisModuleCtx ctx = REDISMODULE_CTX_INIT;
handle = dlopen(path,RTLD_NOW|RTLD_LOCAL); handle = dlopen(path,RTLD_NOW|RTLD_LOCAL);
if (handle == NULL) return C_ERR; if (handle == NULL) {
serverLog(LL_WARNING, "Module %s failed to load: %s", path, dlerror());
return C_ERR;
}
onload = (int (*)(void *))(unsigned long) dlsym(handle,"RedisModule_OnLoad"); onload = (int (*)(void *))(unsigned long) dlsym(handle,"RedisModule_OnLoad");
if (onload == NULL) { if (onload == NULL) {
serverLog(LL_WARNING, serverLog(LL_WARNING,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment