From: Paul Mateer <78475208+Paul-Mateer@users.noreply.github.com> Date: Mon, 8 Mar 2021 11:28:27 +0000 (+0000) Subject: [Core] Capture return value of 2nd call to LoadLibraryEx and add a third call to... X-Git-Tag: v1.10.6^2~79 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d80d53c9701cd9455deaed3b716f6902a1aeba6;p=thirdparty%2Ffreeswitch.git [Core] Capture return value of 2nd call to LoadLibraryEx and add a third call to widen the search to the module in switch_dso_open(). --- diff --git a/src/switch_dso.c b/src/switch_dso.c index 8ec57139b1..a78bba2f8c 100644 --- a/src/switch_dso.c +++ b/src/switch_dso.c @@ -39,7 +39,11 @@ SWITCH_DECLARE(switch_dso_lib_t) switch_dso_open(const char *path, int global, c lib = LoadLibraryEx(path, NULL, 0); if (!lib) { - LoadLibraryEx(path, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); + lib = LoadLibraryEx(path, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); + } + + if (!lib) { + lib = LoadLibraryEx(path, NULL, LOAD_LIBRARY_SEARCH_DEFAULT_DIRS); } if (!lib) {