In q931_getcall(): Simplify test and add related switch types.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1205 2fbb986a-6c06-0410-b554-c9c1f0a7f128
This commit is contained in:
parent
28e7e1cdfe
commit
92c277dae5
17
q931.c
17
q931.c
@ -3042,10 +3042,19 @@ static q931_call *q931_getcall(struct pri *ctrl, int cr)
|
|||||||
prev = NULL;
|
prev = NULL;
|
||||||
while (cur) {
|
while (cur) {
|
||||||
if (cur->cr == cr) {
|
if (cur->cr == cr) {
|
||||||
if (!ctrl->bri && ctrl->switchtype != PRI_SWITCH_GR303_EOC_PATH
|
/* Found existing call. */
|
||||||
&& ctrl->switchtype != PRI_SWITCH_GR303_TMC_SWITCHING
|
switch (ctrl->switchtype) {
|
||||||
&& cur->pri != ctrl) {
|
case PRI_SWITCH_GR303_EOC:
|
||||||
cur->pri = ctrl;
|
case PRI_SWITCH_GR303_EOC_PATH:
|
||||||
|
case PRI_SWITCH_GR303_TMC:
|
||||||
|
case PRI_SWITCH_GR303_TMC_SWITCHING:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
if (!ctrl->bri) {
|
||||||
|
/* PRI is set to whoever called us */
|
||||||
|
cur->pri = ctrl;
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return cur;
|
return cur;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user