提交 2f360ae1 authored 作者: Michael Jerris's avatar Michael Jerris

code analysis

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7031 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 c55dd673
差异被折叠。
...@@ -31,7 +31,8 @@ ...@@ -31,7 +31,8 @@
* switch_core_session.c -- Main Core Library (session routines) * switch_core_session.c -- Main Core Library (session routines)
* *
*/ */
#include <switch.h> #include "switch.h"
#include "switch_core.h"
#include "private/switch_core_pvt.h" #include "private/switch_core_pvt.h"
static struct { static struct {
...@@ -104,7 +105,7 @@ SWITCH_DECLARE(void) switch_core_session_hupall(switch_call_cause_t cause) ...@@ -104,7 +105,7 @@ SWITCH_DECLARE(void) switch_core_session_hupall(switch_call_cause_t cause)
} }
} }
SWITCH_DECLARE(switch_status_t) switch_core_session_message_send(char *uuid_str, switch_core_session_message_t *message) SWITCH_DECLARE(switch_status_t) switch_core_session_message_send(const char *uuid_str, switch_core_session_message_t *message)
{ {
switch_core_session_t *session = NULL; switch_core_session_t *session = NULL;
switch_status_t status = SWITCH_STATUS_FALSE; switch_status_t status = SWITCH_STATUS_FALSE;
...@@ -124,7 +125,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_message_send(char *uuid_str, ...@@ -124,7 +125,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_message_send(char *uuid_str,
return status; return status;
} }
SWITCH_DECLARE(switch_status_t) switch_core_session_event_send(char *uuid_str, switch_event_t **event) SWITCH_DECLARE(switch_status_t) switch_core_session_event_send(const char *uuid_str, switch_event_t **event)
{ {
switch_core_session_t *session = NULL; switch_core_session_t *session = NULL;
switch_status_t status = SWITCH_STATUS_FALSE; switch_status_t status = SWITCH_STATUS_FALSE;
...@@ -177,7 +178,7 @@ SWITCH_DECLARE(int) switch_core_session_get_stream_count(switch_core_session_t * ...@@ -177,7 +178,7 @@ SWITCH_DECLARE(int) switch_core_session_get_stream_count(switch_core_session_t *
} }
SWITCH_DECLARE(switch_call_cause_t) switch_core_session_outgoing_channel(switch_core_session_t *session, SWITCH_DECLARE(switch_call_cause_t) switch_core_session_outgoing_channel(switch_core_session_t *session,
char *endpoint_name, const char *endpoint_name,
switch_caller_profile_t *caller_profile, switch_caller_profile_t *caller_profile,
switch_core_session_t **new_session, switch_core_session_t **new_session,
switch_memory_pool_t **pool, switch_memory_pool_t **pool,
...@@ -840,7 +841,7 @@ SWITCH_DECLARE(switch_size_t) switch_core_session_id(void) ...@@ -840,7 +841,7 @@ SWITCH_DECLARE(switch_size_t) switch_core_session_id(void)
} }
SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request_by_name(char *endpoint_name, switch_memory_pool_t **pool) SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request_by_name(const char *endpoint_name, switch_memory_pool_t **pool)
{ {
const switch_endpoint_interface_t *endpoint_interface; const switch_endpoint_interface_t *endpoint_interface;
...@@ -956,7 +957,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_exec(switch_core_session_t * ...@@ -956,7 +957,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_exec(switch_core_session_t *
return SWITCH_STATUS_SUCCESS; return SWITCH_STATUS_SUCCESS;
} }
SWITCH_DECLARE(switch_status_t) switch_core_session_execute_exten(switch_core_session_t *session, char *exten, char *dialplan, char *context) SWITCH_DECLARE(switch_status_t) switch_core_session_execute_exten(switch_core_session_t *session, const char *exten, const char *dialplan, const char *context)
{ {
char *dp[25]; char *dp[25];
char *dpstr; char *dpstr;
......
...@@ -670,7 +670,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess ...@@ -670,7 +670,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
switch_size_t olen = 0, llen = 0; switch_size_t olen = 0, llen = 0;
switch_frame_t write_frame = { 0 }; switch_frame_t write_frame = { 0 };
switch_timer_t timer = { 0 }; switch_timer_t timer = { 0 };
switch_core_thread_session_t thread_session; switch_core_thread_session_t thread_session = { 0 };
switch_codec_t codec; switch_codec_t codec;
switch_memory_pool_t *pool = switch_core_session_get_pool(session); switch_memory_pool_t *pool = switch_core_session_get_pool(session);
char *codec_name; char *codec_name;
...@@ -1515,7 +1515,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text(switch_core_session_t *ses ...@@ -1515,7 +1515,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text(switch_core_session_t *ses
int interval = 0; int interval = 0;
switch_frame_t write_frame = { 0 }; switch_frame_t write_frame = { 0 };
switch_timer_t ltimer, *timer; switch_timer_t ltimer, *timer;
switch_core_thread_session_t thread_session; switch_core_thread_session_t thread_session = { 0 };
switch_codec_t lcodec, *codec; switch_codec_t lcodec, *codec;
switch_memory_pool_t *pool = switch_core_session_get_pool(session); switch_memory_pool_t *pool = switch_core_session_get_pool(session);
char *codec_name; char *codec_name;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论