aboutsummaryrefslogtreecommitdiffstats
path: root/library/RSL_Emulation.ttcn
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-01-29 22:29:29 +0100
committerHarald Welte <laforge@gnumonks.org>2018-01-29 22:35:41 +0100
commit1909f464af5d2e94bf3c00c6e01354b49ad795c8 (patch)
tree456b610003bab7d7c189e54d88b4208b3f851839 /library/RSL_Emulation.ttcn
parent21583088e8714931b81695b2a5339c7f08e7811b (diff)
bsc: Unregister old RSL channel number after assignment
Diffstat (limited to 'library/RSL_Emulation.ttcn')
-rw-r--r--library/RSL_Emulation.ttcn18
1 files changed, 17 insertions, 1 deletions
diff --git a/library/RSL_Emulation.ttcn b/library/RSL_Emulation.ttcn
index cbcff2c6..d20718f6 100644
--- a/library/RSL_Emulation.ttcn
+++ b/library/RSL_Emulation.ttcn
@@ -50,9 +50,10 @@ type port RSL_DCHAN_PT message {
} 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 @@ function main() runs on RSL_Emulation_CT {
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 @@ function f_rslem_register(uint8_t trx_nr, RslChannelNr chan_nr) runs on RSL_Dcha
}
}
+/* 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:{?,?,?}) {};
+ }
+}
+
+
}