summaryrefslogtreecommitdiff
path: root/apps/app_ivrdemo.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/app_ivrdemo.c')
-rw-r--r--apps/app_ivrdemo.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/app_ivrdemo.c b/apps/app_ivrdemo.c
index 13f4bcc9c..a9c61209a 100644
--- a/apps/app_ivrdemo.c
+++ b/apps/app_ivrdemo.c
@@ -59,7 +59,7 @@ static char *app = "IVRDemo";
static int ivr_demo_func(struct ast_channel *chan, void *data)
{
- ast_verbose("IVR Demo, data is %s!\n", (char *)data);
+ ast_verbose("IVR Demo, data is %s!\n", (char *) data);
return 0;
}
@@ -93,22 +93,24 @@ AST_IVR_DECLARE_MENU(ivr_demo, "IVR Demo Main Menu", 0,
{ NULL },
});
-
-static int skel_exec(struct ast_channel *chan, void *data)
+static int skel_exec(struct ast_channel *chan, const char *data)
{
int res=0;
+ char *tmp;
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "skel requires an argument (filename)\n");
return -1;
}
+ tmp = ast_strdupa(data);
+
/* Do our thing here */
if (chan->_state != AST_STATE_UP)
res = ast_answer(chan);
if (!res)
- res = ast_ivr_menu_run(chan, &ivr_demo, data);
+ res = ast_ivr_menu_run(chan, &ivr_demo, tmp);
return res;
}