don't allow calls of a subscriber to himself

This commit is contained in:
Harald Welte 2009-02-22 21:13:18 +00:00
parent 1ef983b076
commit 5a065dfe2d
1 changed files with 7 additions and 0 deletions

View File

@ -1027,6 +1027,13 @@ static int gsm48_cc_rx_setup(struct msgb *msg)
return gsm48_tx_simple(msg->lchan, GSM48_PDISC_CC,
GSM48_MT_CC_RELEASE_COMPL);
}
if (called_subscr == msg->lchan->subscr) {
DEBUGP(DCC, "subscriber calling himself ?!?\n");
put_lchan(msg->lchan);
subscr_put(called_subscr);
return gsm48_tx_simple(msg->lchan, GSM48_PDISC_CC,
GSM48_MT_CC_RELEASE_COMPL);
}
subscr_get(msg->lchan->subscr);
call->called_subscr = called_subscr;