BSSGP_Emulation: Handle incoming BVCI=0 messages
Like BVCI=PTP, the BVCI=0 messages must be dispatched by their
TLLI, but using the BSSGP_SP_SIG port instead of BSSGP_SP.
Change-Id: Ic456d43ec07600162991698ec3d75d36785b2fb8
diff --git a/library/BSSGP_Emulation.ttcn b/library/BSSGP_Emulation.ttcn
index fa33f51..8988926 100644
--- a/library/BSSGP_Emulation.ttcn
+++ b/library/BSSGP_Emulation.ttcn
@@ -532,7 +532,7 @@
BSSGP_SP.send(f_dec_bssgp(udi.bssgp)) to vc_conn;
}
- /* Any other BSSGP message: If it has TLLi, route to component; otherwise broadcast */
+ /* Any other PTP BSSGP message: If it has TLLi, route to component; otherwise broadcast */
[] BSCP.receive(f_BnsUdInd(?, g_cfg.bvci)) -> value udi {
var BssgpDecoded dec := f_dec_bssgp(udi.bssgp);
var template OCT4 tlli := f_bssgp_get_tlli(udi.bssgp);
@@ -551,6 +551,26 @@
}
}
+ /* Any other SIG BSSGP message: If it has TLLi, route to component; otherwise broadcast */
+ [] BSCP.receive(f_BnsUdInd(?, 0)) -> value udi {
+ var BssgpDecoded dec := f_dec_bssgp(udi.bssgp);
+ var template OCT4 tlli := f_bssgp_get_tlli(udi.bssgp);
+ if (isvalue(tlli)) {
+ vc_conn := f_tbl_comp_by_tlli(valueof(tlli));
+ BSSGP_SP_SIG.send(dec) to vc_conn;
+ } else {
+ log("No TLLI: Broadcasting ", dec);
+ /* broadcast this message to all components */
+ // TITAN DOESN'T DO THIS, *SIGH*: "BSSGP_SP.send(dec) to all component;"
+ for (var integer i := 0; i < sizeof(ClientTable); i := i+1) {
+ if (isbound(ClientTable[i].comp_ref)) {
+ BSSGP_SP_SIG.send(dec) to ClientTable[i].comp_ref;
+ }
+ }
+ }
+ }
+
+
[] BSSGP_SP_SIG.receive(PDU_BSSGP:?)-> value bs_pdu sender vc_conn {
BSCP.send(f_BnsUdReq(bs_pdu, 0));
}