aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_waitforring.c
diff options
context:
space:
mode:
authormurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2006-10-05 01:40:06 +0000
committermurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2006-10-05 01:40:06 +0000
commit6c89612673f099a5cba008adb03d04447b18784c (patch)
tree77e3c1c2a0db4dee32e111ad819061f2b36f444b /apps/app_waitforring.c
parent21d6951aa4abd26c96ddaac072a099d26ff97143 (diff)
As per ToDo list, I have made it so that Wait(), WaitExten(), Congestion(), Busy(), Read(), WaitForRing(), will now either actually handle a floating point argument as advertised, or has been upgraded to accept a floating point [timeout] arg.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@44435 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_waitforring.c')
-rw-r--r--apps/app_waitforring.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/app_waitforring.c b/apps/app_waitforring.c
index a4f69ae77..d59644bac 100644
--- a/apps/app_waitforring.c
+++ b/apps/app_waitforring.c
@@ -58,16 +58,17 @@ static int waitforring_exec(struct ast_channel *chan, void *data)
struct ast_module_user *u;
struct ast_frame *f;
int res = 0;
+ double s;
int ms;
- if (!data || (sscanf(data, "%d", &ms) != 1)) {
+ if (!data || (sscanf(data, "%lg", &s) != 1)) {
ast_log(LOG_WARNING, "WaitForRing requires an argument (minimum seconds)\n");
return 0;
}
u = ast_module_user_add(chan);
- ms *= 1000;
+ ms = s*1000.0;
while(ms > 0) {
ms = ast_waitfor(chan, ms);
if (ms < 0) {