make error more clear about missing trunk_type param in openzap.conf (and auto tolerate the err) and fix printf metas
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@621 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
parent
8d3b22aee5
commit
0fa7d1b68e
|
@ -1897,7 +1897,7 @@ static switch_status_t load_config(void)
|
||||||
"q921loglevel", q921loglevel,
|
"q921loglevel", q921loglevel,
|
||||||
"q931loglevel", q931loglevel,
|
"q931loglevel", q931loglevel,
|
||||||
TAG_END) != ZAP_SUCCESS) {
|
TAG_END) != ZAP_SUCCESS) {
|
||||||
zap_log(ZAP_LOG_ERROR, "Error starting OpenZAP span %d mode: %d dialect: %d error: %s\n", span_id, mode, dialect, span->last_error);
|
zap_log(ZAP_LOG_ERROR, "Error starting OpenZAP span %d mode: %s dialect: %s error: %s\n", span_id, mode, dialect, span->last_error);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1703,8 +1703,8 @@ static ZIO_SIG_CONFIGURE_FUNCTION(zap_isdn_configure_span)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (span->trunk_type >= ZAP_TRUNK_NONE) {
|
if (span->trunk_type >= ZAP_TRUNK_NONE) {
|
||||||
snprintf(span->last_error, sizeof(span->last_error), "Unknown trunk type!");
|
zap_log(ZAP_LOG_WARNING, "Invalid trunk type '%s' defaulting to T1.\n", zap_trunk_type2str(span->trunk_type));
|
||||||
return ZAP_FAIL;
|
span->trunk_type = ZAP_TRUNK_T1;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(i = 1; i <= span->chan_count; i++) {
|
for(i = 1; i <= span->chan_count; i++) {
|
||||||
|
@ -1785,6 +1785,7 @@ static ZIO_SIG_CONFIGURE_FUNCTION(zap_isdn_configure_span)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!digit_timeout) {
|
if (!digit_timeout) {
|
||||||
digit_timeout = DEFAULT_DIGIT_TIMEOUT;
|
digit_timeout = DEFAULT_DIGIT_TIMEOUT;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2482,6 +2482,7 @@ zap_status_t zap_configure_span(const char *type, zap_span_t *span, zio_signal_c
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
} else {
|
} else {
|
||||||
zap_log(ZAP_LOG_ERROR, "can't find '%s'\n", type);
|
zap_log(ZAP_LOG_ERROR, "can't find '%s'\n", type);
|
||||||
|
status = ZAP_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
|
|
Loading…
Reference in New Issue