]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
- Fix a typo in the argument to Playtones
authorRussell Bryant <russell@russellbryant.com>
Thu, 29 May 2008 19:04:52 +0000 (19:04 +0000)
committerRussell Bryant <russell@russellbryant.com>
Thu, 29 May 2008 19:04:52 +0000 (19:04 +0000)
 - 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/branches/1.4@119012 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_milliwatt.c

index 64dc3857c2b23f0cd863f4e67043004e50054cf1..b63771c380e02fbb214c4d2be905196eff8fbb50 100644 (file)
@@ -145,7 +145,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;
        struct ast_module_user *u;
        int res = -1;
 
@@ -161,15 +161,10 @@ static int milliwatt_exec(struct ast_channel *chan, void *data)
                goto exit_app;
        }
 
-       if (!(wait_app = pbx_findapp("Wait"))) {
-               ast_log(LOG_ERROR, "The Wait application is required to run Milliwatt()\n");
-               goto exit_app;
-       }
-
-       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);
        }
 
        res = 0;