提交 b809ddb4 authored 作者: Michael Jerris's avatar Michael Jerris

fix for MODENDP-88 (too many dchans on a span)

git-svn-id: http://svn.openzap.org/svn/openzap/trunk@413 a93c3328-9c30-0410-af19-c9cd2b2d52af
上级 68fba615
...@@ -718,9 +718,14 @@ zap_status_t zap_isdn_configure_span(zap_span_t *span, Q921NetUser_t mode, Q931D ...@@ -718,9 +718,14 @@ zap_status_t zap_isdn_configure_span(zap_span_t *span, Q921NetUser_t mode, Q931D
for(i = 1; i <= span->chan_count; i++) { for(i = 1; i <= span->chan_count; i++) {
if (span->channels[i].type == ZAP_CHAN_TYPE_DQ921) { if (span->channels[i].type == ZAP_CHAN_TYPE_DQ921) {
if (zap_channel_open(span->span_id, i, &dchans[x]) == ZAP_SUCCESS) { if (x > 1) {
zap_log(ZAP_LOG_DEBUG, "opening d-channel #%d %d:%d\n", x, dchans[x]->span_id, dchans[x]->chan_id); snprintf(span->last_error, sizeof(span->last_error), "Span has more than 2 D-Channels!");
x++; return ZAP_FAIL;
} else {
if (zap_channel_open(span->span_id, i, &dchans[x]) == ZAP_SUCCESS) {
zap_log(ZAP_LOG_DEBUG, "opening d-channel #%d %d:%d\n", x, dchans[x]->span_id, dchans[x]->chan_id);
x++;
}
} }
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论