Module: kamailio Branch: master Commit: 795edca9215391f7c8f646895c083f8ac8853341 URL: https://github.com/kamailio/kamailio/commit/795edca9215391f7c8f646895c083f8a...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2018-03-05T21:56:04+01:00
app_perl: do dlerror() after dlsym() fails to find exports
- some OSes do not reset dlerror after a successful dlsym(), pointing to an older error case - reported by GH #1465
---
Modified: src/core/sr_module.c
---
Diff: https://github.com/kamailio/kamailio/commit/795edca9215391f7c8f646895c083f8a... Patch: https://github.com/kamailio/kamailio/commit/795edca9215391f7c8f646895c083f8a...
---
diff --git a/src/core/sr_module.c b/src/core/sr_module.c index 8a195fc12d..f04d486908 100644 --- a/src/core/sr_module.c +++ b/src/core/sr_module.c @@ -619,6 +619,9 @@ int load_module(char* mod_path) } exp = (union module_exports_u*)dlsym(handle, "exports"); if(exp==NULL) { + error =(char*)dlerror(); + LM_DBG("attempt to lookup exports structure failed - dlerror: %s\n", + (error)?error:"none"); /* 'exports' structure not found, look up for '_modulename_exports' */ mdir = strrchr(mod_path, '/'); if (!mdir) {