提交 d20870e1 authored 作者: Anthony Minessale's avatar Anthony Minessale

fix obscure bs, remove CR from dptools, add info app

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3463 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 44649c70
...@@ -1198,11 +1198,14 @@ SWITCH_DECLARE(char *) switch_channel_expand_variables(switch_channel_t *channel ...@@ -1198,11 +1198,14 @@ SWITCH_DECLARE(char *) switch_channel_expand_variables(switch_channel_t *channel
} }
if ((nlen = sub_val ? strlen(sub_val) : 0)) { if ((nlen = sub_val ? strlen(sub_val) : 0)) {
if (len + nlen >= olen) { if (len + nlen >= olen) {
olen = (olen + len + nlen + block); char *dp;
olen += (len + nlen + block);
cpos = c - data; cpos = c - data;
data = realloc(data, olen); if ((dp = realloc(data, olen))) {
c = data + cpos; data = dp;
memset(c, 0, olen - cpos); c = data + cpos;
memset(c, 0, olen - cpos);
}
} }
len += nlen; len += nlen;
......
...@@ -2673,7 +2673,8 @@ static void switch_core_standard_on_execute(switch_core_session_t *session) ...@@ -2673,7 +2673,8 @@ static void switch_core_standard_on_execute(switch_core_session_t *session)
} }
while (switch_channel_get_state(session->channel) == CS_EXECUTE && extension->current_application) { while (switch_channel_get_state(session->channel) == CS_EXECUTE && extension->current_application) {
char *expanded; char *expanded = NULL;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Execute %s(%s)\n", switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Execute %s(%s)\n",
extension->current_application->application_name, extension->current_application->application_name,
extension->current_application->application_data); extension->current_application->application_data);
...@@ -2720,7 +2721,7 @@ static void switch_core_standard_on_execute(switch_core_session_t *session) ...@@ -2720,7 +2721,7 @@ static void switch_core_standard_on_execute(switch_core_session_t *session)
application_interface->application_function(session, expanded); application_interface->application_function(session, expanded);
if (expanded != extension->current_application->application_data) { if (expanded != extension->current_application->application_data) {
free(expanded); switch_safe_free(expanded);
} }
extension->current_application = extension->current_application->next; extension->current_application = extension->current_application->next;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论