Make sure we loop BRI call references for one byte CREFs instead of two
git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@487 2fbb986a-6c06-0410-b554-c9c1f0a7f128
This commit is contained in:
9
q931.c
9
q931.c
@@ -2212,8 +2212,13 @@ q931_call *q931_new_call(struct pri *pri)
|
||||
do {
|
||||
cur = *pri->callpool;
|
||||
pri->cref++;
|
||||
if (pri->cref > 32767)
|
||||
pri->cref = 1;
|
||||
if (!pri->bri) {
|
||||
if (pri->cref > 32767)
|
||||
pri->cref = 1;
|
||||
} else {
|
||||
if (pri->cref > 127)
|
||||
pri->cref = 1;
|
||||
}
|
||||
while(cur) {
|
||||
if (cur->cr == (0x8000 | pri->cref))
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user