From abdb9b1f3fa69c2dbba314c70d5a147a2309772a Mon Sep 17 00:00:00 2001 From: Moises Silva Date: Tue, 19 Jan 2010 19:45:52 +0000 Subject: [PATCH] added support to read from the configuration file ring_on_ms and ring_off_msg git-svn-id: http://svn.openzap.org/svn/openzap/trunk@990 a93c3328-9c30-0410-af19-c9cd2b2d52af --- .../src/ozmod/ozmod_wanpipe/ozmod_wanpipe.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/libs/openzap/src/ozmod/ozmod_wanpipe/ozmod_wanpipe.c b/libs/openzap/src/ozmod/ozmod_wanpipe/ozmod_wanpipe.c index a275acc352..8dad35dca5 100644 --- a/libs/openzap/src/ozmod/ozmod_wanpipe/ozmod_wanpipe.c +++ b/libs/openzap/src/ozmod/ozmod_wanpipe/ozmod_wanpipe.c @@ -368,6 +368,20 @@ static ZIO_CONFIGURE_FUNCTION(wanpipe_configure) } else { wp_globals.flash_ms = num; } + } else if (!strcasecmp(var, "ring_on_ms")) { + num = atoi(val); + if (num < 500 || num > 5000) { + zap_log(ZAP_LOG_WARNING, "invalid ring_on_ms at line %d (valid range 500 to 5000)\n", lineno); + } else { + wp_globals.ring_on_ms = num; + } + } else if (!strcasecmp(var, "ring_off_ms")) { + num = atoi(val); + if (num < 500 || num > 5000) { + zap_log(ZAP_LOG_WARNING, "invalid ring_off_ms at line %d (valid range 500 to 5000)\n", lineno); + } else { + wp_globals.ring_off_ms = num; + } } }