fix config parser and build on some systems
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@547 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
parent
00b24ab8d0
commit
8202ffd578
|
@ -40,7 +40,7 @@ SOLINK = @SOLINK@
|
|||
OZ_SRCDIR=@oz_srcdir@
|
||||
oz_builddir=@oz_builddir@
|
||||
SRC=src
|
||||
top_builddir=@top_builddir@
|
||||
top_builddir=@oz_builddir@
|
||||
INSTALL=@INSTALL@
|
||||
LIBTOOL=@LIBTOOL@
|
||||
LTINSTALL=$(LIBTOOL) --mode=install $(INSTALL)
|
||||
|
|
|
@ -1547,7 +1547,7 @@ static switch_status_t load_config(void)
|
|||
} else if (!strcasecmp(var, "hold-music")) {
|
||||
hold_music = val;
|
||||
} else if (!strcasecmp(var, "max_digits") || !strcasecmp(var, "max-digits")) {
|
||||
digit_timeout = val;
|
||||
max_digits = val;
|
||||
} else if (!strcasecmp(var, "enable-analog-option")) {
|
||||
analog_options = enable_analog_option(val, analog_options);
|
||||
}
|
||||
|
|
|
@ -95,14 +95,6 @@ static ZIO_SIG_CONFIGURE_FUNCTION(zap_analog_configure_span)
|
|||
return ZAP_FAIL;
|
||||
}
|
||||
|
||||
if (digit_timeout < 2000 || digit_timeout > 10000) {
|
||||
digit_timeout = 2000;
|
||||
}
|
||||
|
||||
if (max_dialstr < 2 || max_dialstr > 20) {
|
||||
max_dialstr = 11;
|
||||
}
|
||||
|
||||
analog_data = malloc(sizeof(*analog_data));
|
||||
memset(analog_data, 0, sizeof(*analog_data));
|
||||
assert(analog_data != NULL);
|
||||
|
@ -126,6 +118,15 @@ static ZIO_SIG_CONFIGURE_FUNCTION(zap_analog_configure_span)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
if (digit_timeout < 2000 || digit_timeout > 10000) {
|
||||
digit_timeout = 2000;
|
||||
}
|
||||
|
||||
if (max_dialstr < 2 || max_dialstr > 20) {
|
||||
max_dialstr = 11;
|
||||
}
|
||||
|
||||
span->start = zap_analog_start;
|
||||
analog_data->digit_timeout = digit_timeout;
|
||||
analog_data->max_dialstr = max_dialstr;
|
||||
|
|
Loading…
Reference in New Issue