提交 5043269d authored 作者: Michael Jerris's avatar Michael Jerris

unused vars and a bit more error checking.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7113 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 8f9ae7db
...@@ -1046,7 +1046,6 @@ SWITCH_STANDARD_APP(clear_speech_cache_function) ...@@ -1046,7 +1046,6 @@ SWITCH_STANDARD_APP(clear_speech_cache_function)
SWITCH_STANDARD_APP(speak_function) SWITCH_STANDARD_APP(speak_function)
{ {
switch_channel_t *channel = switch_core_session_get_channel(session); switch_channel_t *channel = switch_core_session_get_channel(session);
switch_codec_t *codec = switch_core_session_get_read_codec(session);
char buf[10]; char buf[10];
char *argv[4] = { 0 }; char *argv[4] = { 0 };
int argc; int argc;
...@@ -1056,7 +1055,6 @@ SWITCH_STANDARD_APP(speak_function) ...@@ -1056,7 +1055,6 @@ SWITCH_STANDARD_APP(speak_function)
char *mydata = NULL; char *mydata = NULL;
switch_input_args_t args = { 0 }; switch_input_args_t args = { 0 };
switch_assert(codec != NULL);
switch_assert(channel != NULL); switch_assert(channel != NULL);
if (switch_strlen_zero(data) || !(mydata = switch_core_session_strdup(session, data))) { if (switch_strlen_zero(data) || !(mydata = switch_core_session_strdup(session, data))) {
...@@ -1253,14 +1251,15 @@ SWITCH_STANDARD_APP(record_function) ...@@ -1253,14 +1251,15 @@ SWITCH_STANDARD_APP(record_function)
SWITCH_STANDARD_APP(record_session_function) SWITCH_STANDARD_APP(record_session_function)
{ {
switch_channel_t *channel = switch_core_session_get_channel(session);
char *p, *path = NULL; char *p, *path = NULL;
uint32_t limit = 0; uint32_t limit = 0;
switch_assert(channel != NULL); if (switch_strlen_zero(data)) {
return;
}
path = switch_core_session_strdup(session, data); path = switch_core_session_strdup(session, data);
if ((p = strchr(path, '+'))) { if (path && (p = strchr(path, '+'))) {
char *q = p - 1; char *q = p - 1;
while(q && *q == ' ') { while(q && *q == ' ') {
*q = '\0'; *q = '\0';
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论