[Freeswitch-svn] [commit] r11085 - in freeswitch/trunk/src: . include mod/languages/mod_spidermonkey

FreeSWITCH SVN mikej at freeswitch.org
Wed Jan 7 06:25:08 PST 2009


Author: mikej
Date: Wed Jan  7 08:25:08 2009
New Revision: 11085

Log:
fix windows build breakage from svn rev 11084

Modified:
   freeswitch/trunk/src/include/switch_dso.h
   freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
   freeswitch/trunk/src/switch_dso.c

Modified: freeswitch/trunk/src/include/switch_dso.h
==============================================================================
--- freeswitch/trunk/src/include/switch_dso.h	(original)
+++ freeswitch/trunk/src/include/switch_dso.h	Wed Jan  7 08:25:08 2009
@@ -30,10 +30,10 @@
 
 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

Modified: freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c	(original)
+++ freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c	Wed Jan  7 08:25:08 2009
@@ -927,8 +927,8 @@
 
  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;
 	}

Modified: freeswitch/trunk/src/switch_dso.c
==============================================================================
--- freeswitch/trunk/src/switch_dso.c	(original)
+++ freeswitch/trunk/src/switch_dso.c	Wed Jan  7 08:25:08 2009
@@ -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 @@
 	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 @@
 	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();



More information about the Freeswitch-svn mailing list