summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@espeweb.net>2021-02-05 12:07:04 +0100
committerPau Espin Pedrol <pespin@espeweb.net>2021-02-08 12:31:14 +0100
commit011e32f8fc5be433df4f5c77c07a91bd0126092f (patch)
tree93c9311a941a276e9fa61a1095fe3f8613076a75
parent03f6606181fe2c92c22fe00b04186a7b907a1a21 (diff)
BSSGP_Emulation: Fix warning: control reaches end of non-void function
-rw-r--r--library/BSSGP_Emulation.ttcnpp31
1 files changed, 16 insertions, 15 deletions
diff --git a/library/BSSGP_Emulation.ttcnpp b/library/BSSGP_Emulation.ttcnpp
index 4af5f82f..04220ed2 100644
--- a/library/BSSGP_Emulation.ttcnpp
+++ b/library/BSSGP_Emulation.ttcnpp
@@ -25,6 +25,7 @@ import from NS_Emulation all;
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 @@ function f_llc_sapi_by_l3_mo(PDU_L3_MS_SGSN l3_mo) return BIT4 {
} 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 @@ private function f_llc_sapi_by_l3_mt(PDU_L3_SGSN_MS l3_mt) return BIT4 {
} 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 @@ type function BssgpCreateCallback(BssgpBvci bvci, BssgpCellId cell_id, OCT4 tlli
/* 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 @@ private function f_tbl_client_del(hexstring imsi, BSSGP_Client_CT vc_conn) runs
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 @@ private function f_tbl_comp_by_imsi(hexstring imsi) runs on BSSGP_BVC_CT return
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 @@ private function f_tbl_idx_by_comp(BSSGP_Client_CT comp_ref) runs on BSSGP_BVC_C
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 @@ private function f_tbl_tlli_by_comp(BSSGP_Client_CT comp_ref) runs on BSSGP_BVC_
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 */