This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
pespin gerrit-no-reply at lists.osmocom.orgpespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18979 )
Change subject: library/RSL: pass lost link event to upper layers instead of failing
......................................................................
library/RSL: pass lost link event to upper layers instead of failing
Some tests may expect that behavior so let the test decide what to do
with it.
Change-Id: Idd4bdfc99514f4c439837f0ce4a20ec5ff45e86c
---
M library/RSL_Emulation.ttcn
1 file changed, 24 insertions(+), 5 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/79/18979/1
diff --git a/library/RSL_Emulation.ttcn b/library/RSL_Emulation.ttcn
index 66cc4dc..2fcb96c 100644
--- a/library/RSL_Emulation.ttcn
+++ b/library/RSL_Emulation.ttcn
@@ -394,6 +394,20 @@
return f_streamId_by_trx(trx_nr);
}
+private function f_trx_conn_map_unregister(integer conn_id)
+runs on RSL_Emulation_CT return IpaStreamId {
+
+ for (var integer i := 0; i < sizeof(TrxConnMap); i := i + 1) {
+ if (conn_id == TrxConnMap[i]) {
+ TrxConnMap[i] := -1;
+ TrxConnNum := TrxConnNum - 1;
+ return f_streamId_by_trx(i);
+ }
+ }
+
+ testcase.stop("Trying to unregister an unknown conn_id=", conn_id);
+}
+
private function f_trx_conn_map_resolve(IpaStreamId id)
runs on RSL_Emulation_CT return integer {
var integer trx_nr := f_trx_by_streamId(id);
@@ -498,12 +512,17 @@
/* Notify the upper layers about a new connection */
CCHAN_PT.send(ts_RSLEm_EV(RSLEM_EV_TRX_UP, sid));
}
- [bts_role] IPA_PT.receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_DOWN)) {
- Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Lost IPA connection!");
-
+ [bts_role] IPA_PT.receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_DOWN)) -> value evt {
+ log("Lost IPA connection! (conn_id=", evt.conn_id, "): ", evt.id_resp);
+ /* Notify the upper layers about lost connection */
+ var IpaStreamId sid := f_trx_conn_map_unregister(evt.conn_id);
+ CCHAN_PT.send(ts_RSLEm_EV(RSLEM_EV_TRX_DOWN, sid));
}
- [not bts_role] IPA_PT.receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_DOWN)) {
- Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Lost IPA connection!");
+ [not bts_role] IPA_PT.receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_DOWN)) -> value evt {
+ log("Lost IPA connection! (conn_id=", evt.conn_id, ")");
+ /* Notify the upper layers about lost connection */
+ var IpaStreamId sid := f_trx_conn_map_unregister(evt.conn_id);
+ CCHAN_PT.send(ts_RSLEm_EV(RSLEM_EV_TRX_DOWN, sid));
}
[bts_role] IPA_PT.receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_ID_ACK)) {
IPA_PT.send(ts_ASP_RSL_UD(ts_RSL_PAGING_LOAD_IND(23)));
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18979
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Idd4bdfc99514f4c439837f0ce4a20ec5ff45e86c
Gerrit-Change-Number: 18979
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200623/a4352a99/attachment.htm>