jolly has uploaded this change for review.

View Change

ASCI: Fixed talker release event before MSC acknowledges

If the talker establishes and releases the uplink before the MSC has
acknowledged or rejected the uplink access, the event and the cause is
queued. When the MSC acknowledges the uplink acces, the UPLINK RELEASE
INDICATION is sent with queued cause.

Change-Id: I753b78ba3b8b5e589746780328028443d80cf099
---
M include/osmocom/bsc/gsm_data.h
M src/osmo-bsc/vgcs_fsm.c
2 files changed, 31 insertions(+), 0 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/52/33852/1
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 43f08d5..7d36baa 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -429,6 +429,9 @@
struct gsm_subscriber_connection *talker;
/* L3 info of link establihment (Talker established) */
struct llist_head l3_queue;
+ /* Flag and cause (Talker released) */
+ bool talker_rel;
+ uint8_t talker_cause;
/* Flag that states acknowledgement of the talker by MSC */
bool msc_ack;
/* List of VGCS/VBS "resource controling" connections */
diff --git a/src/osmo-bsc/vgcs_fsm.c b/src/osmo-bsc/vgcs_fsm.c
index d999490..87461b2 100644
--- a/src/osmo-bsc/vgcs_fsm.c
+++ b/src/osmo-bsc/vgcs_fsm.c
@@ -192,6 +192,7 @@
while ((msg = msgb_dequeue(&conn->vgcs_call.l3_queue)))
msgb_free(msg);
conn->vgcs_call.msc_ack = false;
+ conn->vgcs_call.talker_rel = false;
/* Report busy uplink to the MSC. */
bsc_tx_uplink_req(conn);
/* Block all other channels. */
@@ -292,6 +293,13 @@
break;
case VGCS_EV_TALKER_REL:
LOG_CALL(conn, LOGL_DEBUG, "Talker released on uplink.\n");
+ if (!conn->vgcs_call.msc_ack) {
+ LOG_CALL(conn, LOGL_DEBUG, "Talker released before MSC acknowleded or rejected.\n");
+ conn->vgcs_call.talker_rel = true;
+ conn->vgcs_call.talker_cause = cause;
+ break;
+ }
+talker_released:
/* Talker released channel, call becomes idle. */
osmo_fsm_inst_state_chg(fi, VGCS_CALL_ST_IDLE, 0, 0);
conn->vgcs_call.talker = NULL;
@@ -338,6 +346,12 @@
bsc_dtap(conn, 0, msg);
msgb_free(msg);
}
+ /* If there is a pending talker release. */
+ if (conn->vgcs_call.talker_rel) {
+ LOG_CALL(conn, LOGL_DEBUG, "Sending queued talker release messages to MSC.\n");
+ cause = conn->vgcs_call.talker_cause;
+ goto talker_released;
+ }
break;
case VGCS_EV_MSC_REJECT:
LOG_CALL(conn, LOGL_DEBUG, "MSC rejects talker on uplink.\n");

To view, visit change 33852. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I753b78ba3b8b5e589746780328028443d80cf099
Gerrit-Change-Number: 33852
Gerrit-PatchSet: 1
Gerrit-Owner: jolly <andreas@eversberg.eu>
Gerrit-MessageType: newchange