Fix Segmentationfault with unattended calls
if a call was not taken by an application and multiple applications are listening, it could happen that the PLCI was deleted before we did sent the CONNECT_IND to all applications. Signed-off-by: Karsten Keil <keil@b1-systems.de>
This commit is contained in:
parent
6b4d631ed5
commit
469b9b5f6b
|
@ -1055,6 +1055,10 @@ static void plci_cc_setup_ind(struct FsmInst *fi, int event, void *arg)
|
|||
ret = check_free_bchannels(p4lController(lp->lc));
|
||||
if (ret == 0)
|
||||
lp->cause = CAUSE_USER_BUSY;
|
||||
else
|
||||
lp->cause = CAUSE_NO_CHANNEL;
|
||||
lp->cause_loc = CAUSE_LOC_USER;
|
||||
lp->rel_req = 1;
|
||||
return;
|
||||
} else {
|
||||
wprint("%s: Channel ID:%s SETUP without channelid is indicated as waiting call\n",
|
||||
|
|
|
@ -180,15 +180,7 @@ static void plciHandleSetupInd(struct mPLCI *plci, int pr, struct mc_buf *mc)
|
|||
if ((lc->CIPmask & CIPmask) || (lc->CIPmask & 1)) {
|
||||
ret = lPLCICreate(&lp, lc, plci);
|
||||
if (!ret) {
|
||||
lPLCI_l3l4(lp, pr, mc);
|
||||
dprint(MIDEBUG_PLCI, "%s: SETUP %s\n",
|
||||
CAPIobjIDstr(&lp->cobj), lp->ignored ? "ignored - no B-channel" : "delivered");
|
||||
if (!lp->ignored) {
|
||||
found++;
|
||||
} else {
|
||||
if (lp->cause)
|
||||
cause = lp->cause;
|
||||
}
|
||||
found++;
|
||||
put_cobj(&lp->cobj);
|
||||
} else {
|
||||
wprint("%s: cannot create lPLCI\n", CAPIobjIDstr(&plci->cobj));
|
||||
|
@ -196,6 +188,19 @@ static void plciHandleSetupInd(struct mPLCI *plci, int pr, struct mc_buf *mc)
|
|||
}
|
||||
co = get_next_cobj(&pc->cobjLC, co);
|
||||
}
|
||||
if (plci->cobj.itemcnt) {
|
||||
/* at least one lplci was created */
|
||||
co = get_next_cobj(&plci->cobj, NULL);
|
||||
while (co) {
|
||||
lp = container_of(co, struct lPLCI, cobj);
|
||||
lPLCI_l3l4(lp, pr, mc);
|
||||
dprint(MIDEBUG_PLCI, "%s: SETUP %s\n",
|
||||
CAPIobjIDstr(&lp->cobj), lp->ignored ? "ignored - no B-channel" : "delivered");
|
||||
if (lp->ignored)
|
||||
cleanup_lPLCI(lp);
|
||||
co = get_next_cobj(&plci->cobj, co);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (found == 0) {
|
||||
struct l3_msg *l3m;
|
||||
|
|
Loading…
Reference in New Issue