mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-02 01:25:11 +00:00
fix paramater checking on switch_ivr_phrase_macro and it's consumers.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4187 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
d41b3e14dc
commit
712976653d
3 files changed
+18
-3
No files matched your search
@@ -128,9 +128,8 @@ static void phrase_function(switch_core_session_t *session, char *data)
|
||||
if ((mdata = strchr(macro, ','))) {
|
||||
*mdata++ = '\0';
|
||||
}
|
||||
if (!(lang = switch_channel_get_variable(channel, "language"))) {
|
||||
lang = "en";
|
||||
}
|
||||
|
||||
lang = switch_channel_get_variable(channel, "language");
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Execute %s(%s) lang %s\n", macro, mdata, lang);
|
||||
switch_ivr_phrase_macro(session, macro, mdata, lang, NULL);
|
||||
|
||||
@@ -1029,8 +1029,11 @@ static JSBool session_sayphrase(JSContext *cx, JSObject *obj, uintN argc, jsval
|
||||
if (switch_strlen_zero(phrase_name)) {
|
||||
return JS_FALSE;
|
||||
}
|
||||
} else {
|
||||
return JS_FALSE;
|
||||
}
|
||||
|
||||
|
||||
if (argc > 1) {
|
||||
phrase_data = JS_GetStringBytes(JS_ValueToString(cx, argv[1]));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user