[S] Change in osmo-ttcn3-hacks[master]: s1gw: Immediate stop all components upon ConnHdlr failure
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37909?usp=email ) Change subject: s1gw: Immediate stop all components upon ConnHdlr failure ...................................................................... s1gw: Immediate stop all components upon ConnHdlr failure Otherwise it's difficult to see/find in logs stuff like timeouts waiting for messages, etc. Change-Id: I8b3b7e9cd61a8ad0d167f20a41c61eac3f245d70 --- M s1gw/ConnHdlr.ttcn 1 file changed, 16 insertions(+), 13 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve Jenkins Builder: Verified osmith: Looks good to me, approved diff --git a/s1gw/ConnHdlr.ttcn b/s1gw/ConnHdlr.ttcn index cd327ef..4af0ef7 100644 --- a/s1gw/ConnHdlr.ttcn +++ b/s1gw/ConnHdlr.ttcn @@ -70,8 +70,8 @@ local_addr, 0, -1, { sctp := c_SctpTuple_S1AP }); if (not ispresent(res.connId)) { - setverdict(fail, "Could not create an S1AP socket, check your configuration"); - mtc.stop; + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + "Could not create an S1AP socket, check your configuration"); } g_s1ap_conn_id := res.connId; @@ -83,8 +83,8 @@ } [] S1AP_ENB.receive(PortEvent:{sctpEvent := ?}) { repeat; } [] T.timeout { - setverdict(fail, "eNB connection establishment timeout"); - self.stop; + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + "eNB connection establishment timeout"); } } } @@ -131,11 +131,12 @@ T.stop; } [] S1AP_CONN.receive(S1AP_PDU:?) -> value pdu { - setverdict(fail, "Rx unexpected S1AP PDU from eNB: ", pdu); - T.stop; + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str("Rx unexpected S1AP PDU from eNB: ", pdu)); } [] T.timeout { - setverdict(fail, "Timeout waiting for S1AP PDU from eNB: ", tr_pdu); + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str("Timeout waiting for S1AP PDU from eNB: ", tr_pdu)); } } } @@ -156,11 +157,12 @@ } [] S1AP_ENB.receive(t_S1AP_RecvFrom(?)) -> value recv { pdu := recv.msg; - setverdict(fail, "Rx unexpected S1AP PDU from MME: ", pdu); - T.stop; + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str("Rx unexpected S1AP PDU from MME: ", pdu)); } [] T.timeout { - setverdict(fail, "Timeout waiting for S1AP PDU from MME: ", tr_pdu); + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str("Timeout waiting for S1AP PDU from MME: ", tr_pdu)); } } } @@ -188,11 +190,12 @@ T.stop; } [] S1AP_CONN.receive(S1AP_PDU:?) -> value pdu { - setverdict(fail, "Rx unexpected S1AP PDU: ", pdu); - T.stop; + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str("Rx unexpected S1AP PDU: ", pdu)); } [] T.timeout { - setverdict(fail, "Timeout waiting for S1AP SetupReq"); + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str("Timeout waiting for S1AP SetupReq")); } } } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37909?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I8b3b7e9cd61a8ad0d167f20a41c61eac3f245d70 Gerrit-Change-Number: 37909 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-Reviewer: osmith <osmith@sysmocom.de> Gerrit-Reviewer: pespin <pespin@sysmocom.de>
participants (1)
-
pespin