mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-16 00:41:41 +00:00
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3334 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
a5f16da175
commit
b87df5bcd2
@ -3268,7 +3268,7 @@ struct switch_ivr_menu {
|
|||||||
char *ptr;
|
char *ptr;
|
||||||
int max_failures;
|
int max_failures;
|
||||||
int timeout;
|
int timeout;
|
||||||
int inlen;
|
uint32_t inlen;
|
||||||
uint32_t flags;
|
uint32_t flags;
|
||||||
struct switch_ivr_menu_action *actions;
|
struct switch_ivr_menu_action *actions;
|
||||||
struct switch_ivr_menu *next;
|
struct switch_ivr_menu *next;
|
||||||
@ -3394,14 +3394,14 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_init(switch_ivr_menu_t **new,
|
|||||||
SWITCH_DECLARE(switch_status_t) switch_ivr_menu_bind_action(switch_ivr_menu_t *menu, switch_ivr_action_t ivr_action, char *arg, char *bind)
|
SWITCH_DECLARE(switch_status_t) switch_ivr_menu_bind_action(switch_ivr_menu_t *menu, switch_ivr_action_t ivr_action, char *arg, char *bind)
|
||||||
{
|
{
|
||||||
switch_ivr_menu_action_t *action;
|
switch_ivr_menu_action_t *action;
|
||||||
switch_size_t len;
|
uint32_t len;
|
||||||
if ((action = switch_core_alloc(menu->pool, sizeof(*action)))) {
|
if ((action = switch_core_alloc(menu->pool, sizeof(*action)))) {
|
||||||
action->bind = switch_core_strdup(menu->pool, bind);
|
action->bind = switch_core_strdup(menu->pool, bind);
|
||||||
action->next = menu->actions;
|
action->next = menu->actions;
|
||||||
action->arg = switch_core_strdup(menu->pool, arg);
|
action->arg = switch_core_strdup(menu->pool, arg);
|
||||||
len = strlen(action->bind);
|
len = (uint32_t)strlen(action->bind);
|
||||||
if (len > menu->inlen) {
|
if (len > menu->inlen) {
|
||||||
menu->inlen = (uint32_t)len;
|
menu->inlen = len;
|
||||||
}
|
}
|
||||||
action->ivr_action = ivr_action;
|
action->ivr_action = ivr_action;
|
||||||
menu->actions = action;
|
menu->actions = action;
|
||||||
@ -3446,14 +3446,12 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_free_stack(switch_ivr_menu_t *st
|
|||||||
|
|
||||||
static switch_status_t play_or_say(switch_core_session_t *session, switch_ivr_menu_t *menu, char *sound, uint32_t need)
|
static switch_status_t play_or_say(switch_core_session_t *session, switch_ivr_menu_t *menu, char *sound, uint32_t need)
|
||||||
{
|
{
|
||||||
memset(menu->buf, 0, menu->inlen);
|
|
||||||
menu->ptr = menu->buf;
|
|
||||||
char terminator;
|
char terminator;
|
||||||
uint32_t len;
|
uint32_t len;
|
||||||
char *ptr;
|
char *ptr;
|
||||||
|
|
||||||
switch_status_t status = SWITCH_STATUS_SUCCESS;
|
switch_status_t status = SWITCH_STATUS_SUCCESS;
|
||||||
|
|
||||||
|
memset(menu->buf, 0, menu->inlen);
|
||||||
menu->ptr = menu->buf;
|
menu->ptr = menu->buf;
|
||||||
|
|
||||||
if (!need) {
|
if (!need) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user