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:
Anthony Minessale
2008-09-08 23:01:44 +00:00
parent 2178f9b87d
commit 38f509239e
3 changed files with 11 additions and 10 deletions

View File

@@ -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;