msc: Only kill connections belonging to the given MSC
When a MSC connection drops, only kill the connections that
belong to the given MSC and not all other connections.
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_sccp.c b/openbsc/src/osmo-bsc/osmo_bsc_sccp.c
index cc4eedf..1410cc6 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_sccp.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_sccp.c
@@ -272,8 +272,10 @@
{
struct osmo_bsc_sccp_con *con, *tmp;
- llist_for_each_entry_safe(con, tmp, &active_connections, entry)
- bsc_sccp_force_free(con);
+ llist_for_each_entry_safe(con, tmp, &active_connections, entry) {
+ if (con->msc->msc_con == msc_con)
+ bsc_sccp_force_free(con);
+ }
}
static int handle_msc_signal(unsigned int subsys, unsigned int signal,