[Asterisk-cvs] asterisk/apps app_rpt.c,1.35,1.36
jim at lists.digium.com
jim at lists.digium.com
Sat Jul 9 23:05:16 CDT 2005
Update of /usr/cvsroot/asterisk/apps
In directory localhost.localdomain:/tmp/cvs-serv31703/asterisk/apps
Modified Files:
app_rpt.c
Log Message:
Fixed iobase specification in rpt.conf and put in check for 'keyed' for
main system rx DTMF.
Index: app_rpt.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_rpt.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- app_rpt.c 4 Jul 2005 00:52:18 -0000 1.35
+++ app_rpt.c 10 Jul 2005 03:13:42 -0000 1.36
@@ -3,7 +3,7 @@
* Asterisk -- A telephony toolkit for Linux.
*
* Radio Repeater / Remote Base program
- * version 0.26 07/02/05
+ * version 0.27 07/09/05
*
* See http://www.zapatatelephony.org/app_rpt.html
*
@@ -159,7 +159,7 @@
#include "asterisk/say.h"
#include "asterisk/localtime.h"
-static char *tdesc = "Radio Repeater / Remote Base version 0.26 07/02/2005";
+static char *tdesc = "Radio Repeater / Remote Base version 0.27 07/09/2005";
static char *app = "Rpt";
@@ -3694,6 +3694,7 @@
c = (char) f->subclass; /* get DTMF char */
ast_frfree(f);
+ if (!myrpt->keyed) continue;
if (c == myrpt->endchar)
{
/* if in simple mode, kill autopatch */
@@ -4209,8 +4210,11 @@
rpt_vars[n].remote = ast_variable_retrieve(cfg,this,"remote");
rpt_vars[n].tonezone = ast_variable_retrieve(cfg,this,"tonezone");
val = ast_variable_retrieve(cfg,this,"iobase");
- if (val) rpt_vars[n].iobase = atoi(val);
- else rpt_vars[n].iobase = DEFAULT_IOBASE;
+ /* do not use atoi() here, we need to be able to have
+ the input specified in hex or decimal so we use
+ sscanf with a %i */
+ if ((!val) || (sscanf(val,"%i",&rpt_vars[n].iobase) != 1))
+ rpt_vars[n].iobase = DEFAULT_IOBASE;
rpt_vars[n].simple = 0;
rpt_vars[n].functions = ast_variable_retrieve(cfg,this,"functions");
if (!rpt_vars[n].functions)
More information about the svn-commits
mailing list