[asterisk-commits] oej: branch oej/agave-dtmf-duration-asterisk-conf-trunk r363523 - in /team/oe...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Apr 25 04:18:00 CDT 2012
Author: oej
Date: Wed Apr 25 04:17:58 2012
New Revision: 363523
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=363523
Log:
Making the option unsigned (thanks for the review Alec Davies)
We could propably change many options to unsigned. Have someone heard
of a negative amount of maxcalls? Maybe a large amount of negative calls,
reaching the maxnegcalls limit...
Modified:
team/oej/agave-dtmf-duration-asterisk-conf-trunk/include/asterisk/options.h
team/oej/agave-dtmf-duration-asterisk-conf-trunk/main/asterisk.c
Modified: team/oej/agave-dtmf-duration-asterisk-conf-trunk/include/asterisk/options.h
URL: http://svnview.digium.com/svn/asterisk/team/oej/agave-dtmf-duration-asterisk-conf-trunk/include/asterisk/options.h?view=diff&rev=363523&r1=363522&r2=363523
==============================================================================
--- team/oej/agave-dtmf-duration-asterisk-conf-trunk/include/asterisk/options.h (original)
+++ team/oej/agave-dtmf-duration-asterisk-conf-trunk/include/asterisk/options.h Wed Apr 25 04:17:58 2012
@@ -157,7 +157,7 @@
extern int option_maxfiles; /*!< Max number of open file handles (files, sockets) */
extern int option_debug; /*!< Debugging */
extern int option_maxcalls; /*!< Maximum number of simultaneous channels */
-extern int option_dtmfminduration; /*!< Minimum duration of DTMF (channel.c) in ms */
+extern unsigned int option_dtmfminduration; /*!< Minimum duration of DTMF (channel.c) in ms */
extern double option_maxload;
#if defined(HAVE_SYSINFO)
extern long option_minmemfree; /*!< Minimum amount of free system memory - stop accepting calls if free memory falls below this watermark */
Modified: team/oej/agave-dtmf-duration-asterisk-conf-trunk/main/asterisk.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/agave-dtmf-duration-asterisk-conf-trunk/main/asterisk.c?view=diff&rev=363523&r1=363522&r2=363523
==============================================================================
--- team/oej/agave-dtmf-duration-asterisk-conf-trunk/main/asterisk.c (original)
+++ team/oej/agave-dtmf-duration-asterisk-conf-trunk/main/asterisk.c Wed Apr 25 04:17:58 2012
@@ -186,7 +186,7 @@
double option_maxload; /*!< Max load avg on system */
int option_maxcalls; /*!< Max number of active calls */
int option_maxfiles; /*!< Max number of open file handles (files, sockets) */
-int option_dtmfminduration; /*!< Minimum duration of DTMF. */
+unsigned int option_dtmfminduration; /*!< Minimum duration of DTMF. */
#if defined(HAVE_SYSINFO)
long option_minmemfree; /*!< Minimum amount of free system memory - stop accepting calls if free memory falls below this watermark */
#endif
@@ -492,7 +492,7 @@
ast_cli(a->fd, " Internal timing: %s\n", ast_test_flag(&ast_options, AST_OPT_FLAG_INTERNAL_TIMING) ? "Enabled" : "Disabled");
ast_cli(a->fd, " Transmit silence during rec: %s\n", ast_test_flag(&ast_options, AST_OPT_FLAG_TRANSMIT_SILENCE) ? "Enabled" : "Disabled");
ast_cli(a->fd, " Generic PLC: %s\n", ast_test_flag(&ast_options, AST_OPT_FLAG_GENERIC_PLC) ? "Enabled" : "Disabled");
- ast_cli(a->fd, " Min DTMF duration:: %d\n", option_dtmfminduration);
+ ast_cli(a->fd, " Min DTMF duration:: %u\n", option_dtmfminduration);
ast_cli(a->fd, "\n* Subsystems\n");
ast_cli(a->fd, " -------------\n");
@@ -3203,7 +3203,7 @@
} else if (!strcasecmp(v->name, "internal_timing")) {
ast_set2_flag(&ast_options, ast_true(v->value), AST_OPT_FLAG_INTERNAL_TIMING);
} else if (!strcasecmp(v->name, "mindtmfduration")) {
- if ((sscanf(v->value, "%30d", &option_dtmfminduration) != 1) || (option_dtmfminduration < 0)) {
+ if (sscanf(v->value, "%30u", &option_dtmfminduration) != 1) {
option_dtmfminduration = AST_MIN_DTMF_DURATION;
}
} else if (!strcasecmp(v->name, "maxcalls")) {
More information about the asterisk-commits
mailing list