If userl1 is -1, don't include it

git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@76 2fbb986a-6c06-0410-b554-c9c1f0a7f128
This commit is contained in:
Mark Spencer 2004-02-08 00:20:18 +00:00
parent c3544cb866
commit 24fba7f9b7

15
q931.c
View File

@ -641,14 +641,15 @@ static int transmit_bearer_capability(struct pri *pri, q931_call *call, int msgt
ie->data[1] = call->transmoderate | 0x80;
if (call->transmoderate != TRANS_MODE_PACKET) {
/* If you have an AT&T 4ESS, you don't send any more info */
if (pri->switchtype == PRI_SWITCH_ATT4ESS)
if ((pri->switchtype != PRI_SWITCH_ATT4ESS) && (call->userl1 > -1)) {
ie->data[2] = call->userl1 | 0x80; /* XXX Ext bit? XXX */
if (call->userl1 == PRI_LAYER_1_ITU_RATE_ADAPT) {
ie->data[3] = call->rateadaption | 0x80;
return 6;
}
return 5;
} else
return 4;
ie->data[2] = call->userl1 | 0x80; /* XXX Ext bit? XXX */
if (call->userl1 == PRI_LAYER_1_ITU_RATE_ADAPT) {
ie->data[3] = call->rateadaption | 0x80;
return 6;
}
return 5;
} else {
ie->data[2] = 0x80 | call->userl2;
ie->data[3] = 0x80 | call->userl3;