提交 102e7350 authored 作者: Anthony Minessale's avatar Anthony Minessale

tidy up on top of last commit

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3906 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 01541265
...@@ -2341,6 +2341,11 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess ...@@ -2341,6 +2341,11 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
odata = strdup(bridgeto); odata = strdup(bridgeto);
data = odata; data = odata;
/* strip leading spaces */
while (data && *data && *data == ' ') {
data++;
}
if (*data == '{') { if (*data == '{') {
vars = data + 1; vars = data + 1;
if (!(data = strchr(data, '}'))) { if (!(data = strchr(data, '}'))) {
...@@ -2351,7 +2356,17 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess ...@@ -2351,7 +2356,17 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
*data++ = '\0'; *data++ = '\0';
} }
/* strip leading spaces (again)*/
while (data && *data && *data == ' ') {
data++;
}
if (switch_strlen_zero(data)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n");
status = SWITCH_STATUS_GENERR;
goto done;
}
/* Some channel are created from an originating channel and some aren't so not all outgoing calls have a way to get params /* Some channel are created from an originating channel and some aren't so not all outgoing calls have a way to get params
so we will normalize dialstring params and channel variables (when there is an originator) into an event that we so we will normalize dialstring params and channel variables (when there is an originator) into an event that we
will use as a pseudo hash to consult for params as needed. will use as a pseudo hash to consult for params as needed.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论