jolly has submitted this change. (
https://gerrit.osmocom.org/c/osmo-bsc/+/41503?usp=email )
Change subject: ASCI: Fix removal of call notification when lchan fails
......................................................................
ASCI: Fix removal of call notification when lchan fails
When ASCI resource setup fails, due to channel assignment failure, the
lchan will be removed from gsm_subscriber_connection structure. Adding
a 'bts' pointer to gsm_subscriber_connection structure allows the ASCI
resource FSM destructor to remove call notification from that BTS.
Change-Id: Ib5f7fdf8c3b3606002151f86d2bdfaeb33904364
---
M include/osmocom/bsc/gsm_data.h
M src/osmo-bsc/vgcs_fsm.c
2 files changed, 8 insertions(+), 6 deletions(-)
Approvals:
pespin: Looks good to me, but someone else must approve
laforge: Looks good to me, but someone else must approve
Jenkins Builder: Verified
jolly: Looks good to me, approved
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 59d22d7..63cc8e2 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -472,6 +472,8 @@
struct gsm_subscriber_connection *call;
/* Cell (BTS) FSM */
struct osmo_fsm_inst *fi;
+ /* BTS to notify about ongoing call */
+ struct gsm_bts *notify_bts;
/* lchan to be assigned */
struct gsm_lchan *new_lchan;
/* MGW peer */
diff --git a/src/osmo-bsc/vgcs_fsm.c b/src/osmo-bsc/vgcs_fsm.c
index 1f2bbef..70390f8 100644
--- a/src/osmo-bsc/vgcs_fsm.c
+++ b/src/osmo-bsc/vgcs_fsm.c
@@ -602,10 +602,7 @@
if (conn->vgcs_chan.fi->state != VGCS_CHAN_ST_WAIT_EST) {
/* Remove call from notification channel. */
- if (conn->lchan)
- rsl_notification_cmd(conn->lchan->ts->trx->bts, NULL,
&conn->vgcs_chan.gc_ie, NULL);
- else
- LOG_CHAN(conn, LOGL_ERROR, "Unable to remove
notification, lchan is already gone.\n");
+ rsl_notification_cmd(conn->vgcs_chan.notify_bts, NULL,
&conn->vgcs_chan.gc_ie, NULL);
}
/* Detach from call, if not already. */
@@ -731,7 +728,7 @@
osmo_fsm_inst_state_chg(fi,
VGCS_CHAN_ST_ACTIVE_BLOCKED, 0, 0);
if (conn->vgcs_chan.call) {
/* Add call to notification channel. */
- rsl_notification_cmd(conn->lchan->ts->trx->bts,
conn->lchan, &conn->vgcs_chan.gc_ie, NULL);
+ rsl_notification_cmd(conn->vgcs_chan.notify_bts,
conn->lchan, &conn->vgcs_chan.gc_ie, NULL);
/* Add/update SI10. */
si10_update(conn->vgcs_chan.call);
}
@@ -798,7 +795,7 @@
if (conn->vgcs_chan.call)
osmo_fsm_inst_dispatch(conn->vgcs_chan.call->vgcs_call.fi,
VGCS_EV_CALLING_ASSIGNED, conn);
/* Repeat notification for the MS that has been assigned. */
- rsl_notification_cmd(conn->lchan->ts->trx->bts, conn->lchan,
&conn->vgcs_chan.gc_ie, NULL);
+ rsl_notification_cmd(conn->vgcs_chan.notify_bts, conn->lchan,
&conn->vgcs_chan.gc_ie, NULL);
break;
case VGCS_EV_CLEANUP:
LOG_CHAN(conn, LOGL_DEBUG, "SCCP connection clearing.\n");
@@ -1248,6 +1245,9 @@
}
conn->vgcs_chan.new_lchan = lchan;
+ /* Set BTS that receives notification. */
+ conn->vgcs_chan.notify_bts = bts;
+
/* Create VGCS FSM. */
conn->vgcs_chan.fi = osmo_fsm_inst_alloc(&vgcs_chan_fsm, conn->network,
conn, LOGL_DEBUG, NULL);
if (!conn->vgcs_chan.fi)
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/41503?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ib5f7fdf8c3b3606002151f86d2bdfaeb33904364
Gerrit-Change-Number: 41503
Gerrit-PatchSet: 1
Gerrit-Owner: jolly <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: jolly <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: neels <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>