Harald Welte has submitted this change and it was merged.

Change subject: bsc: Unregister old RSL channel number after assignment
......................................................................


bsc: Unregister old RSL channel number after assignment

Change-Id: I27d113391094f938ff92c4d6514172ee634f695c
---
M bsc/MSC_ConnectionHandler.ttcn
M library/RSL_Emulation.ttcn
2 files changed, 20 insertions(+), 3 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn
index 6afeca2..55cdb89 100644
--- a/bsc/MSC_ConnectionHandler.ttcn
+++ b/bsc/MSC_ConnectionHandler.ttcn
@@ -426,8 +426,9 @@
                }
        [st.rr_ass_cmpl_seen] RSL.receive(tr_RSL_RF_CHAN_REL(st.old_chan_nr)) {
                RSL.send(ts_RSL_RF_CHAN_REL_ACK(st.old_chan_nr));
-               /* FIXME: unregister for old channel number in RSL emulation */
-               //f_rslem_unregister(0, st.old_chan_nr);
+               /* unregister for old channel number in RSL emulation */
+               /* FIXME: Determine TRX NR by ARFCN, instead of hard-coded 
TRX0! */
+               f_rslem_unregister(0, st.old_chan_nr);
                st.assignment_done := true;
                repeat;
                }
diff --git a/library/RSL_Emulation.ttcn b/library/RSL_Emulation.ttcn
index cbcff2c..d20718f 100644
--- a/library/RSL_Emulation.ttcn
+++ b/library/RSL_Emulation.ttcn
@@ -50,9 +50,10 @@
 } with { extension "internal" };
 
 signature RSLEM_register(uint8_t trx_nr, RslChannelNr chan_nr, RSL_DchanHdlr 
hdlr);
+signature RSLEM_unregister(uint8_t trx_nr, RslChannelNr chan_nr, RSL_DchanHdlr 
hdlr);
 
 type port RSLEM_PROC_PT procedure {
-       inout RSLEM_register;
+       inout RSLEM_register, RSLEM_unregister;
 } with { extension "internal" };
 
 /***********************************************************************
@@ -379,6 +380,13 @@
                        RSL_PROC.reply(RSLEM_register:{trx_nr, chan_nr, 
vc_conn});
                        }
 
+               [] RSL_PROC.getcall(RSLEM_unregister:{?,?,?}) -> param(trx_nr, 
chan_nr, vc_conn) {
+                       cid := f_cid_by_chan_nr(trx_nr, chan_nr);
+                       f_cid_clear(cid);
+                       RSL_PROC.reply(RSLEM_unregister:{trx_nr, chan_nr, 
vc_conn});
+                       }
+
+
                }
        }
 }
@@ -400,4 +408,12 @@
        }
 }
 
+/* client/conn_hdlr side function to use procedure port to unregister 
stream_id/chan_nr */
+function f_rslem_unregister(uint8_t trx_nr, RslChannelNr chan_nr) runs on 
RSL_DchanHdlr {
+       RSL_PROC.call(RSLEM_unregister:{trx_nr, chan_nr, self}) {
+               [] RSL_PROC.getreply(RSLEM_unregister:{?,?,?}) {};
+       }
+}
+
+
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I27d113391094f938ff92c4d6514172ee634f695c
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <[email protected]>
Gerrit-Reviewer: Harald Welte <[email protected]>
Gerrit-Reviewer: Jenkins Builder

Reply via email to