BSSGP_Emulation: Fix warning: control reaches end of non-void function
Change-Id: I9a44afc81b5b6b35a32a12efcf2dd1cb15e73e12
diff --git a/library/BSSGP_Emulation.ttcnpp b/library/BSSGP_Emulation.ttcnpp
index 4af5f82..04220ed 100644
--- a/library/BSSGP_Emulation.ttcnpp
+++ b/library/BSSGP_Emulation.ttcnpp
@@ -25,6 +25,7 @@
import from BSSGP_Types all;
import from Osmocom_Gb_Types all;
import from IPL4asp_Types all;
+import from Misc_Helpers all;
#ifdef BSSGP_EM_L3
import from MobileL3_GMM_SM_Types all;
@@ -591,8 +592,8 @@
} else if (ischosen(l3_mo.msgs.sms)) {
return c_LLC_SAPI_LLSMS;
}
- setverdict(fail, "No LLC SAPI for ", l3_mo);
- mtc.stop;
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, log2str("No LLC SAPI for ", l3_mo));
+ return '0000'B;
}
private function f_llc_sapi_by_l3_mt(PDU_L3_SGSN_MS l3_mt) return BIT4 {
@@ -603,8 +604,8 @@
} else if (ischosen(l3_mt.msgs.sms)) {
return c_LLC_SAPI_LLSMS;
}
- setverdict(fail, "No LLC SAPI for ", l3_mt);
- mtc.stop;
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, log2str("No LLC SAPI for ", l3_mt));
+ return '0000'B;
}
#endif
@@ -830,8 +831,7 @@
/* Default Create Callback function: Fail and terminate */
function DefaultCreateCallback(BssgpBvci bvci, BssgpCellId cell_id, OCT4 tlli, BssgpDecoded dec) runs on BSSGP_BVC_CT {
- setverdict(fail, "Couldn't find Component for TLLI ", tlli);
- mtc.stop;
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, log2str("Couldn't find Component for TLLI ", tlli));
}
/*
@@ -874,9 +874,10 @@
for (i := 0; i < sizeof(ClientTable); i := i+1) {
if (isvalue(ClientTable[i].imsi) and ClientTable[i].imsi == imsi) {
if (ClientTable[i].comp_ref != vc_conn) {
- setverdict(fail, "Cannot unregister index=", i, " IMSI ", imsi, " registred to ",
- ClientTable[i].comp_ref, " from ", vc_conn);
- mtc.stop;
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
+ log2str("Cannot unregister index=", i, " IMSI ",
+ imsi, " registred to ", ClientTable[i].comp_ref,
+ " from ", vc_conn));
}
log("Removing Client IMSI=", imsi, ", index=", i);
ClientTable[i] := {
@@ -919,8 +920,8 @@
return ClientTable[i].comp_ref;
}
}
- setverdict(fail, "Couldn't find Component for IMSI ", imsi);
- mtc.stop;
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, log2str("Couldn't find Component for IMSI ", imsi));
+ return ClientTable[0].comp_ref;
}
private function f_tbl_comp_by_tlli(OCT4 tlli) runs on BSSGP_BVC_CT return BSSGP_Client_CT {
@@ -942,8 +943,8 @@
return i;
}
}
- setverdict(fail, "Couldn't find Client for Component ", comp_ref);
- mtc.stop;
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, log2str("Couldn't find Client for Component ", comp_ref));
+ return 1;
}
private function f_tbl_tlli_by_comp(BSSGP_Client_CT comp_ref) runs on BSSGP_BVC_CT return OCT4 {
@@ -954,8 +955,8 @@
return ClientTable[i].tlli;
}
}
- setverdict(fail, "Couldn't find TLLI for Component ", comp_ref);
- mtc.stop;
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, log2str("Couldn't find TLLI for Component ", comp_ref));
+ return '00000000'O;
}
/* PDU_BSSGP enhanced with LLC and possibly L3 decoded payloads */