bsc_api: Send RR Release and de-activate the SACCH on error
In case the connection should not be created/accepted release the channel by sending a RR Release and de-activating the SACCH. Phones should deal better with that behavior.
This commit is contained in:
parent
ec2542627e
commit
cc7b22a53b
|
@ -618,7 +618,7 @@ int gsm0408_rcvmsg(struct msgb *msg, uint8_t link_id)
|
||||||
rc = BSC_API_CONN_POL_REJECT;
|
rc = BSC_API_CONN_POL_REJECT;
|
||||||
lchan->conn = subscr_con_allocate(msg->lchan);
|
lchan->conn = subscr_con_allocate(msg->lchan);
|
||||||
if (!lchan->conn) {
|
if (!lchan->conn) {
|
||||||
lchan_release(lchan, 0, 0);
|
lchan_release(lchan, 1, 0);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -628,7 +628,7 @@ int gsm0408_rcvmsg(struct msgb *msg, uint8_t link_id)
|
||||||
if (rc != BSC_API_CONN_POL_ACCEPT) {
|
if (rc != BSC_API_CONN_POL_ACCEPT) {
|
||||||
lchan->conn->lchan = NULL;
|
lchan->conn->lchan = NULL;
|
||||||
subscr_con_free(lchan->conn);
|
subscr_con_free(lchan->conn);
|
||||||
lchan_release(lchan, 0, 0);
|
lchan_release(lchan, 1, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue