mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-14 01:49:05 +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:
@@ -4617,6 +4617,19 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_phrase_macro(switch_core_session_t *s
|
||||
channel = switch_core_session_get_channel(session);
|
||||
assert(channel != NULL);
|
||||
|
||||
if (!macro_name) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No phrase macro specified.\n");
|
||||
return status;
|
||||
}
|
||||
|
||||
if (!lang) {
|
||||
lang = "en";
|
||||
}
|
||||
|
||||
if (!data) {
|
||||
data = "";
|
||||
}
|
||||
|
||||
switch_url_encode(data, enc_hint, sizeof(enc_hint));
|
||||
snprintf(hint_data, sizeof(hint_data), "macro_name=%s&lang=%s&data=%s", macro_name, lang, enc_hint);
|
||||
|
||||
|
Reference in New Issue
Block a user