[asterisk-commits] russell: branch 1.4 r119012 - /branches/1.4/apps/app_milliwatt.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu May 29 14:04:53 CDT 2008


Author: russell
Date: Thu May 29 14:04:52 2008
New Revision: 119012

URL: http://svn.digium.com/view/asterisk?view=rev&rev=119012
Log:
 - 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!)

Modified:
    branches/1.4/apps/app_milliwatt.c

Modified: branches/1.4/apps/app_milliwatt.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_milliwatt.c?view=diff&rev=119012&r1=119011&r2=119012
==============================================================================
--- branches/1.4/apps/app_milliwatt.c (original)
+++ branches/1.4/apps/app_milliwatt.c Thu May 29 14:04:52 2008
@@ -145,7 +145,7 @@
 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 @@
 		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;




More information about the asterisk-commits mailing list