提交 4d7a0ac0 authored 作者: Anthony Minessale's avatar Anthony Minessale

FS-8167 #resolve [FS segs]

上级 359c0cbc
...@@ -234,8 +234,16 @@ SWITCH_DECLARE(const char *) API::execute(const char *cmd, const char *arg) ...@@ -234,8 +234,16 @@ SWITCH_DECLARE(const char *) API::execute(const char *cmd, const char *arg)
{ {
switch_stream_handle_t stream = { 0 }; switch_stream_handle_t stream = { 0 };
this_check(""); this_check("");
SWITCH_STANDARD_STREAM(stream); SWITCH_STANDARD_STREAM(stream);
if (zstr(cmd)) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "No application specified\n");
stream.write_function(&stream, "-ERR No application specified");
} else {
switch_api_execute(cmd, arg, session, &stream); switch_api_execute(cmd, arg, session, &stream);
}
return (char *) stream.data; return (char *) stream.data;
} }
...@@ -730,6 +738,11 @@ SWITCH_DECLARE(void) CoreSession::execute(const char *app, const char *data) ...@@ -730,6 +738,11 @@ SWITCH_DECLARE(void) CoreSession::execute(const char *app, const char *data)
this_check_void(); this_check_void();
sanity_check_noreturn; sanity_check_noreturn;
if (zstr(app)) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "No application specified\n");
return;
}
begin_allow_threads(); begin_allow_threads();
switch_core_session_execute_application(session, app, data); switch_core_session_execute_application(session, app, data);
end_allow_threads(); end_allow_threads();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论