diff --git a/src/include/switch_log.h b/src/include/switch_log.h index 75765bf9b5..5942a34370 100644 --- a/src/include/switch_log.h +++ b/src/include/switch_log.h @@ -94,7 +94,7 @@ SWITCH_DECLARE(switch_status_t) switch_log_shutdown(void); \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 diff --git a/src/include/switch_types.h b/src/include/switch_types.h index 0bde317431..14e144b5f8 100644 --- a/src/include/switch_types.h +++ b/src/include/switch_types.h @@ -393,9 +393,9 @@ typedef enum { } 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 diff --git a/src/switch_core.c b/src/switch_core.c index 748566cb85..f1d93cded2 100644 --- a/src/switch_core.c +++ b/src/switch_core.c @@ -2308,7 +2308,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess 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) { diff --git a/src/switch_log.c b/src/switch_log.c index 622c735d73..059e5af0ec 100644 --- a/src/switch_log.c +++ b/src/switch_log.c @@ -162,14 +162,14 @@ static void *SWITCH_THREAD_FUNC log_thread(switch_thread_t *thread, void *obj) 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();