rua: discard context maps on id-Disconnect
When an id-Disconnect is received, the RUA to SCCP user context becomes unused. Mark the context map as inactive in that case. It will be cleaned up by the context map garbage collector. Related: OS#2776 Change-Id: I9616f72bfa566de081098ee13e720ff0f5266c77
This commit is contained in:
parent
aa3e9ebcb4
commit
b10e2937d9
|
@ -185,6 +185,7 @@ static int rua_to_scu(struct hnb_context *hnb,
|
|||
struct hnbgw_cnlink *cn = hnb->gw->sccp.cnlink;
|
||||
struct osmo_sccp_addr *remote_addr;
|
||||
bool is_ps;
|
||||
bool release_context_map = false;
|
||||
int rc;
|
||||
|
||||
switch (cN_DomainIndicator) {
|
||||
|
@ -239,6 +240,7 @@ static int rua_to_scu(struct hnb_context *hnb,
|
|||
case OSMO_SCU_PRIM_N_DISCONNECT:
|
||||
prim->u.disconnect.conn_id = map->scu_conn_id;
|
||||
prim->u.disconnect.cause = cause;
|
||||
release_context_map = true;
|
||||
break;
|
||||
case OSMO_SCU_PRIM_N_UNITDATA:
|
||||
prim->u.unitdata.called_addr = *remote_addr;
|
||||
|
@ -261,6 +263,9 @@ static int rua_to_scu(struct hnb_context *hnb,
|
|||
|
||||
rc = osmo_sccp_user_sap_down(cn->sccp_user, &prim->oph);
|
||||
|
||||
if (release_context_map)
|
||||
context_map_deactivate(map);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue