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:
Anthony Minessale 2009-01-09 22:11:04 +00:00
parent 755b203096
commit ac845fb58f
3 changed files with 5 additions and 3 deletions

View File

@ -1897,7 +1897,7 @@ static switch_status_t load_config(void)
"q921loglevel", q921loglevel,
"q931loglevel", q931loglevel,
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;
}

View File

@ -1703,8 +1703,8 @@ static ZIO_SIG_CONFIGURE_FUNCTION(zap_isdn_configure_span)
}
if (span->trunk_type >= ZAP_TRUNK_NONE) {
snprintf(span->last_error, sizeof(span->last_error), "Unknown trunk type!");
return ZAP_FAIL;
zap_log(ZAP_LOG_WARNING, "Invalid trunk type '%s' defaulting to T1.\n", zap_trunk_type2str(span->trunk_type));
span->trunk_type = ZAP_TRUNK_T1;
}
for(i = 1; i <= span->chan_count; i++) {
@ -1785,6 +1785,7 @@ static ZIO_SIG_CONFIGURE_FUNCTION(zap_isdn_configure_span)
}
}
if (!digit_timeout) {
digit_timeout = DEFAULT_DIGIT_TIMEOUT;
}

View File

@ -2482,6 +2482,7 @@ zap_status_t zap_configure_span(const char *type, zap_span_t *span, zio_signal_c
va_end(ap);
} else {
zap_log(ZAP_LOG_ERROR, "can't find '%s'\n", type);
status = ZAP_FAIL;
}
return status;