mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-11-03 13:33:29 +00:00
IuCS: properly clean up conn on release
Don't call msc_subscr_con_free() directly, instead use gsm0408_clear_request(), which properly cleans up all pending operations before freeing the connection.
This commit is contained in:
@@ -125,7 +125,7 @@ int gsm0408_rcvmsg_iucs(struct gsm_network *network, struct msgb *msg,
|
||||
" %s from LAC %d to %d\n",
|
||||
subscr_name(conn->subscr), conn->lac, *lac);
|
||||
/* Deallocate conn with previous LAC */
|
||||
msc_subscr_con_free(conn);
|
||||
gsm0408_clear_request(conn, 0);
|
||||
/* At this point we could be tolerant and allocate a new
|
||||
* connection, but changing the LAC within the same connection
|
||||
* is shifty. Rather cancel everything. */
|
||||
@@ -161,7 +161,7 @@ int gsm0408_rcvmsg_iucs(struct gsm_network *network, struct msgb *msg,
|
||||
|
||||
rc = msc_compl_l3(conn, msg, 0);
|
||||
if (rc != MSC_CONN_ACCEPT) {
|
||||
msc_subscr_con_free(conn);
|
||||
gsm0408_clear_request(conn, 0);
|
||||
rc = -1;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -91,7 +91,7 @@ int iucs_rx_ranap_event(struct gsm_network *network,
|
||||
case IU_EVENT_LINK_INVALIDATED:
|
||||
LOGP(DIUCS, LOGL_INFO, "IuCS release for %s\n",
|
||||
subscr_name(conn->subscr));
|
||||
msc_subscr_con_free(conn);
|
||||
gsm0408_clear_request(conn, 0);
|
||||
return 0;
|
||||
|
||||
case IU_EVENT_SECURITY_MODE_COMPLETE:
|
||||
|
||||
Reference in New Issue
Block a user