summaryrefslogtreecommitdiff
path: root/apps/app_milliwatt.c
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2008-05-29 19:05:33 +0000
committerRussell Bryant <russell@russellbryant.com>2008-05-29 19:05:33 +0000
commit83b13ff7c9bd10864580ab9c7a146c0925471ec1 (patch)
tree86b127fc49e5e66e5c94f6cfda23b7e5bf114eb1 /apps/app_milliwatt.c
parent9397f042945af7cc710d290cd812b4deb589033d (diff)
Merged revisions 119012 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r119012 | russell | 2008-05-29 14:04:52 -0500 (Thu, 29 May 2008) | 4 lines - Fix a typo in the argument to Playtones - use ast_safe_sleep() instead of calling the wait application (thanks to tilghman for pointing these out!) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@119013 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_milliwatt.c')
-rw-r--r--apps/app_milliwatt.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/apps/app_milliwatt.c b/apps/app_milliwatt.c
index 57d092d83..0fcd72151 100644
--- a/apps/app_milliwatt.c
+++ b/apps/app_milliwatt.c
@@ -133,7 +133,7 @@ static int old_milliwatt_exec(struct ast_channel *chan)
static int milliwatt_exec(struct ast_channel *chan, void *data)
{
const char *options = data;
- struct ast_app *playtones_app, *wait_app;
+ struct ast_app *playtones_app;
int res = -1;
if (!ast_strlen_zero(options) && strchr(options, 'o')) {
@@ -145,15 +145,10 @@ static int milliwatt_exec(struct ast_channel *chan, void *data)
return -1;
}
- if (!(wait_app = pbx_findapp("Wait"))) {
- ast_log(LOG_ERROR, "The Wait application is required to run Milliwatt()\n");
- return -1;
- }
-
- res = pbx_exec(chan, playtones_app, "1004,1000");
+ res = pbx_exec(chan, playtones_app, "1004/1000");
while (!res) {
- res = pbx_exec(chan, wait_app, "3600");
+ res = ast_safe_sleep(chan, 10000);
}
return res;