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:
Matthew Fredrickson
2007-11-21 22:30:09 +00:00
parent 3071a4da29
commit 581287c8dc

9
q931.c
View File

@@ -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;