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
This commit is contained in:
parent
68fba615a5
commit
b809ddb4ec
|
@ -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++) {
|
||||
if (span->channels[i].type == ZAP_CHAN_TYPE_DQ921) {
|
||||
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++;
|
||||
if (x > 1) {
|
||||
snprintf(span->last_error, sizeof(span->last_error), "Span has more than 2 D-Channels!");
|
||||
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++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue