fix windows build breakage from svn rev 11084
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11085 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
2549501cf9
commit
4d97fb66a0
|
@ -30,10 +30,10 @@ typedef void * switch_dso_lib_t;
|
|||
|
||||
typedef void * switch_dso_data_t;
|
||||
|
||||
void switch_dso_destroy(switch_dso_lib_t *lib);
|
||||
switch_dso_lib_t switch_dso_open(const char *path, int global, char **err);
|
||||
switch_dso_func_t switch_dso_func_sym(switch_dso_lib_t lib, const char *sym, char **err);
|
||||
void *switch_dso_data_sym(switch_dso_lib_t lib, const char *sym, char **err);
|
||||
SWITCH_DECLARE(void) switch_dso_destroy(switch_dso_lib_t *lib);
|
||||
SWITCH_DECLARE(switch_dso_lib_t) switch_dso_open(const char *path, int global, char **err);
|
||||
SWITCH_DECLARE(switch_dso_func_t) switch_dso_func_sym(switch_dso_lib_t lib, const char *sym, char **err);
|
||||
SWITCH_DECLARE(void *) switch_dso_data_sym(switch_dso_lib_t lib, const char *sym, char **err);
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
@ -927,8 +927,8 @@ static switch_status_t sm_load_file(char *filename)
|
|||
|
||||
err:
|
||||
|
||||
if (err) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Loading module %s\n**%s**\n", filename, err);
|
||||
if (err || !module) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Loading module %s\n**%s**\n", filename, switch_str_nil(err));
|
||||
switch_safe_free(derr);
|
||||
return SWITCH_STATUS_GENERR;
|
||||
}
|
||||
|
|
|
@ -24,14 +24,14 @@
|
|||
|
||||
#ifdef WIN32
|
||||
|
||||
void switch_dso_destroy(switch_dso_lib_t *lib) {
|
||||
SWITCH_DECLARE(void) switch_dso_destroy(switch_dso_lib_t *lib) {
|
||||
if (lib && *lib) {
|
||||
FreeLibrary(*lib);
|
||||
*lib = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
switch_dso_lib_t switch_dso_open(const char *path, int global, char **err) {
|
||||
SWITCH_DECLARE(switch_dso_lib_t) switch_dso_open(const char *path, int global, char **err) {
|
||||
HINSTANCE lib;
|
||||
|
||||
lib = LoadLibraryEx(path, NULL, 0);
|
||||
|
@ -48,7 +48,7 @@ switch_dso_lib_t switch_dso_open(const char *path, int global, char **err) {
|
|||
return lib;
|
||||
}
|
||||
|
||||
switch_dso_func_t switch_dso_func_sym(switch_dso_lib_t lib, const char *sym, char **err) {
|
||||
SWITCH_DECLARE(switch_dso_func_t) switch_dso_func_sym(switch_dso_lib_t lib, const char *sym, char **err) {
|
||||
FARPROC func = GetProcAddress(lib, sym);
|
||||
if (!func) {
|
||||
DWORD error = GetLastError();
|
||||
|
@ -57,7 +57,7 @@ switch_dso_func_t switch_dso_func_sym(switch_dso_lib_t lib, const char *sym, cha
|
|||
return (switch_dso_func_t)func;
|
||||
}
|
||||
|
||||
void *switch_dso_data_sym(switch_dso_lib_t lib, const char *sym, char **err) {
|
||||
SWITCH_DECLARE(void *) switch_dso_data_sym(switch_dso_lib_t lib, const char *sym, char **err) {
|
||||
FARPROC addr = GetProcAddress(lib, sym);
|
||||
if (!addr) {
|
||||
DWORD error = GetLastError();
|
||||
|
|
Loading…
Reference in New Issue