From 3d323f5345583c7d380d79d1773a5625f0b441d1 Mon Sep 17 00:00:00 2001 From: Steve Murphy Date: Thu, 5 Oct 2006 01:40:06 +0000 Subject: 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: https://origsvn.digium.com/svn/asterisk/trunk@44435 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_waitforring.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'apps/app_waitforring.c') 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) { -- cgit v1.2.3