Review at  https://gerrit.osmocom.org/7707

fix BSC Clear Request

On receiving a Clear Request, don't send a Clear Command "out of band", let the
FSM do the release handling by invoking msc_subscr_conn_mo_close().

Fixes: ttcn3 MSC_Tests.TC_lu_clear_request
Change-Id: I168b889ac7989641cc679b781dcffb87ff13a710
---
M src/libmsc/a_iface_bssap.c
1 file changed, 2 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/07/7707/1

diff --git a/src/libmsc/a_iface_bssap.c b/src/libmsc/a_iface_bssap.c
index 87ccf05..6d5848a 100644
--- a/src/libmsc/a_iface_bssap.c
+++ b/src/libmsc/a_iface_bssap.c
@@ -216,8 +216,6 @@
 static int bssmap_rx_clear_rqst(struct gsm_subscriber_connection *conn,
                                struct msgb *msg, struct tlv_parsed *tp)
 {
-       int rc;
-       struct msgb *msg_resp;
        uint8_t cause;
 
        LOGPCONN(conn, LOGL_INFO, "Rx BSSMAP CLEAR REQUEST\n");
@@ -228,13 +226,9 @@
        }
        cause = TLVP_VAL(tp, GSM0808_IE_CAUSE)[0];
 
-       /* Respond with clear command */
-       msg_resp = gsm0808_create_clear_command(GSM0808_CAUSE_CALL_CONTROL);
-       rc = osmo_sccp_tx_data_msg(conn->a.scu, conn->a.conn_id, msg_resp);
+       msc_subscr_conn_mo_close(conn, cause);
 
-       msc_clear_request(conn, cause);
-
-       return rc;
+       return 0;
 }
 
 /* Endpoint to handle BSSMAP clear complete */

-- 
To view, visit https://gerrit.osmocom.org/7707
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I168b889ac7989641cc679b781dcffb87ff13a710
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofm...@sysmocom.de>

Reply via email to