f_perform_compl_l3: make receiving bssmap optional

Adding LCS to OsmoBSC creates the possibility of a Paging for LCS, where the
Paging Response should not emit a Complete Layer 3 on the A-interface.

Change-Id: Icb402b7436d844d939790f3cfb3725ffcf1136d2
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 3fb2a86..d926ad8 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -6206,7 +6206,7 @@
 	}
 }
 
-private function f_perform_compl_l3(RSL_DCHAN_PT rsl, template PDU_ML3_MS_NW l3_info, boolean do_clear := true)
+private function f_perform_compl_l3(RSL_DCHAN_PT rsl, template PDU_ML3_MS_NW l3_info, boolean do_clear := true, boolean expect_bssmap_l3 := true)
 runs on MSC_ConnHdlr {
 	timer T := 10.0;
 	var octetstring l3_enc := enc_PDU_ML3_MS_NW(valueof(l3_info));
@@ -6249,34 +6249,36 @@
 	rsl.send(ts_RSL_EST_IND(g_chan_nr, valueof(g_pars.link_id), l3_enc));
 
 
-	f_logp(BSCVTY, "expect BSSAP Complete Layer 3 Info at MSC");
-	var template PDU_BSSAP exp_l3_compl;
-	exp_l3_compl := tr_BSSMAP_ComplL3()
-	if (g_pars.aoip == false) {
-		exp_l3_compl.pdu.bssmap.completeLayer3Information.codecList := omit;
-	} else {
-		exp_l3_compl.pdu.bssmap.completeLayer3Information.codecList := ?;
-	}
+	if (expect_bssmap_l3) {
+		f_logp(BSCVTY, "expect BSSAP Complete Layer 3 Info at MSC");
+		var template PDU_BSSAP exp_l3_compl;
+		exp_l3_compl := tr_BSSMAP_ComplL3()
+		if (g_pars.aoip == false) {
+			exp_l3_compl.pdu.bssmap.completeLayer3Information.codecList := omit;
+		} else {
+			exp_l3_compl.pdu.bssmap.completeLayer3Information.codecList := ?;
+		}
 
-	var PDU_BSSAP bssap;
-	T.start;
-	alt {
-	[] BSSAP.receive(exp_l3_compl) -> value bssap {
-		f_logp(BSCVTY, "received expected Complete Layer 3 Info at MSC");
-		log("rx exp_l3_compl = ", bssap);
+		var PDU_BSSAP bssap;
+		T.start;
+		alt {
+		[] BSSAP.receive(exp_l3_compl) -> value bssap {
+			f_logp(BSCVTY, "received expected Complete Layer 3 Info at MSC");
+			log("rx exp_l3_compl = ", bssap);
+			}
+		[] BSSAP.receive(tr_BSSMAP_ComplL3) {
+			Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Received non-matching COMPLETE LAYER 3 INFORMATION");
+			}
+		[] T.timeout {
+			Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Timeout waiting for COMPLETE LAYER 3 INFORMATION");
+			}
 		}
-	[] BSSAP.receive(tr_BSSMAP_ComplL3) {
-		Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Received non-matching COMPLETE LAYER 3 INFORMATION");
-		}
-	[] T.timeout {
-		Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Timeout waiting for COMPLETE LAYER 3 INFORMATION");
-		}
-	}
 
-	/* start ciphering, if requested */
-	if (ispresent(g_pars.encr)) {
-		f_logp(BSCVTY, "start ciphering");
-		f_cipher_mode(g_pars.encr.enc_alg, g_pars.encr.enc_key);
+		/* start ciphering, if requested */
+		if (ispresent(g_pars.encr)) {
+			f_logp(BSCVTY, "start ciphering");
+			f_cipher_mode(g_pars.encr.enc_alg, g_pars.encr.enc_key);
+		}
 	}
 
 	if (do_clear) {