[Freeswitch-svn] [commit] r3691 - in freeswitch/trunk/src: . include

Freeswitch SVN mikej at freeswitch.org
Sun Dec 17 23:32:51 EST 2006


Author: mikej
Date: Sun Dec 17 23:32:50 2006
New Revision: 3691

Modified:
   freeswitch/trunk/src/include/switch_log.h
   freeswitch/trunk/src/include/switch_types.h
   freeswitch/trunk/src/switch_core.c
   freeswitch/trunk/src/switch_log.c

Log:
char * -> const char *

Modified: freeswitch/trunk/src/include/switch_log.h
==============================================================================
--- freeswitch/trunk/src/include/switch_log.h	(original)
+++ freeswitch/trunk/src/include/switch_log.h	Sun Dec 17 23:32:50 2006
@@ -94,7 +94,7 @@
   \param ... variable args
   \note there are channel macros to supply the first 4 parameters
 */
-SWITCH_DECLARE(void) switch_log_printf(switch_text_channel_t channel, char *file, char *func, int line, switch_log_level_t level, char *fmt, ...);
+SWITCH_DECLARE(void) switch_log_printf(switch_text_channel_t channel, const char *file, const char *func, int line, switch_log_level_t level, char *fmt, ...);
 
 /*! 
   \brief Shut down  the logging engine

Modified: freeswitch/trunk/src/include/switch_types.h
==============================================================================
--- freeswitch/trunk/src/include/switch_types.h	(original)
+++ freeswitch/trunk/src/include/switch_types.h	Sun Dec 17 23:32:50 2006
@@ -393,9 +393,9 @@
 } switch_core_session_message_flag_t;
 
 #define SWITCH_UUID_FORMATTED_LENGTH APR_UUID_FORMATTED_LENGTH 	
-#define SWITCH_CHANNEL_LOG SWITCH_CHANNEL_ID_LOG, __FILE__, (char *) __FUNCTION__, __LINE__
-#define SWITCH_CHANNEL_LOG_CLEAN SWITCH_CHANNEL_ID_LOG_CLEAN, __FILE__, (char *)__FUNCTION__, __LINE__
-#define SWITCH_CHANNEL_EVENT SWITCH_CHANNEL_ID_EVENT, __FILE__, (char *)__FUNCTION__, __LINE__
+#define SWITCH_CHANNEL_LOG SWITCH_CHANNEL_ID_LOG, __FILE__, __FUNCTION__, __LINE__
+#define SWITCH_CHANNEL_LOG_CLEAN SWITCH_CHANNEL_ID_LOG_CLEAN, __FILE__, __FUNCTION__, __LINE__
+#define SWITCH_CHANNEL_EVENT SWITCH_CHANNEL_ID_EVENT, __FILE__, __FUNCTION__, __LINE__
 
 /*!
   \enum switch_channel_state_t

Modified: freeswitch/trunk/src/switch_core.c
==============================================================================
--- freeswitch/trunk/src/switch_core.c	(original)
+++ freeswitch/trunk/src/switch_core.c	Sun Dec 17 23:32:50 2006
@@ -2308,7 +2308,7 @@
 
 SWITCH_DECLARE(switch_status_t) switch_core_session_perform_kill_channel(switch_core_session_t *session, 
                                                                          const char *file, 
-                                                                         char *func, 
+                                                                         const char *func, 
                                                                          int line, 
                                                                          switch_signal_t sig)
 {

Modified: freeswitch/trunk/src/switch_log.c
==============================================================================
--- freeswitch/trunk/src/switch_log.c	(original)
+++ freeswitch/trunk/src/switch_log.c	Sun Dec 17 23:32:50 2006
@@ -162,14 +162,14 @@
 	return NULL;
 }
 
-SWITCH_DECLARE(void) switch_log_printf(switch_text_channel_t channel, char *file, char *func, int line, switch_log_level_t level, char *fmt, ...)
+SWITCH_DECLARE(void) switch_log_printf(switch_text_channel_t channel, const char *file, const char *func, int line, switch_log_level_t level, char *fmt, ...)
 {
 	char *data = NULL;
 	char *new_fmt = NULL;
 	int ret = 0;
 	va_list ap;
 	FILE *handle;
-	char *filep = (file ? switch_cut_path(file): "");
+	const char *filep = (file ? (const char *)switch_cut_path((char *)file): "");
 	const char *funcp = (func ? func : "");
 	char *content = NULL;
 	switch_time_t now = switch_time_now();



More information about the Freeswitch-svn mailing list