[Freeswitch-svn] [commit] r2949 - freeswitch/trunk/src

Freeswitch SVN mikej at freeswitch.org
Mon Oct 2 12:48:02 EDT 2006


Author: mikej
Date: Mon Oct  2 12:48:00 2006
New Revision: 2949

Modified:
   freeswitch/trunk/src/switch.c
   freeswitch/trunk/src/switch_core.c

Log:
fix prototype of signal handler functions (sun studio doesn't like these wrong)

Modified: freeswitch/trunk/src/switch.c
==============================================================================
--- freeswitch/trunk/src/switch.c	(original)
+++ freeswitch/trunk/src/switch.c	Mon Oct  2 12:48:00 2006
@@ -51,12 +51,12 @@
 static HANDLE shutdown_event;
 #endif
 
-	static int handle_SIGHUP(int sig)
+static void handle_SIGHUP(int sig)
 {
 	uint32_t arg = 0;
 	if(sig);
 	switch_core_session_ctl(SCSC_SHUTDOWN, &arg);
-	return 0;
+	return;
 }
 
 
@@ -228,8 +228,8 @@
 	if (bg) {
 		ppath = lfile;
 
-		signal(SIGHUP, (void *) handle_SIGHUP);
-		signal(SIGTERM, (void *) handle_SIGHUP);
+		signal(SIGHUP, handle_SIGHUP);
+		signal(SIGTERM, handle_SIGHUP);
 
 #ifdef WIN32
 		FreeConsole();

Modified: freeswitch/trunk/src/switch_core.c
==============================================================================
--- freeswitch/trunk/src/switch_core.c	(original)
+++ freeswitch/trunk/src/switch_core.c	Mon Oct  2 12:48:00 2006
@@ -3677,26 +3677,26 @@
 	return SWITCH_STATUS_SUCCESS;
 }
 #ifdef SIGPIPE
-static int handle_SIGPIPE(int sig)
+static void handle_SIGPIPE(int sig)
 {
 	if(sig);
 	switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Sig Pipe!\n");
-	return 0;
+	return;
 }
 #endif
 #ifdef TRAP_BUS
-static int handle_SIGBUS(int sig)
+static void handle_SIGBUS(int sig)
 {
 	switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Sig BUS!\n");
-	return 0;
+	return;
 }
 #endif
 
 /* no ctl-c mofo */
-static int handle_SIGINT(int sig)
+static void handle_SIGINT(int sig)
 {
 	if (sig);
-	return 0;
+	return;
 }
 SWITCH_DECLARE(switch_status_t) switch_core_init_and_modload(char *console, const char **err)
 {
@@ -3706,12 +3706,12 @@
 	}
 
 	/* set signal handlers */
-	signal(SIGINT, (void *) handle_SIGINT);
+	signal(SIGINT, handle_SIGINT);
 #ifdef SIGPIPE
-	signal(SIGPIPE, (void *) handle_SIGPIPE);
+	signal(SIGPIPE, handle_SIGPIPE);
 #endif
 #ifdef TRAP_BUS
-	signal(SIGBUS, (void *) handle_SIGBUS);
+	signal(SIGBUS, handle_SIGBUS);
 #endif
 	
 	switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Bringing up environment.\n");



More information about the Freeswitch-svn mailing list