pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29069 )


Change subject: OSMUX_Emulation: Add special error case for port events
......................................................................

OSMUX_Emulation: Add special error case for port events

This way it's easier to quickly spot there was a problem with the socket
connection.

Change-Id: I962bf4837a9e359576c42a51a9919891186c7100
---
M library/OSMUX_Emulation.ttcn
1 file changed, 6 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/69/29069/1

diff --git a/library/OSMUX_Emulation.ttcn b/library/OSMUX_Emulation.ttcn
index 5d9a95e..6189266 100644
--- a/library/OSMUX_Emulation.ttcn
+++ b/library/OSMUX_Emulation.ttcn
@@ -422,7 +422,7 @@
        var OsmuxRxHandle rx_hdl;
        var OsmuxTxHandle tx_hdl;
        var octetstring payload_truncated;
-
+       var PortEvent port_event;
        timer T_transmit := int2float(g_cfg.tx_duration_ms)/1000.0;
        var Osmux_RecvFrom rx_osmux;
        var PDU_Osmux_AMR  rx_amr;
@@ -569,6 +569,11 @@
                        T_transmit.start;
                }
 
+               [] OSMUX.receive(PortEvent:?) -> value port_event {
+                       Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
+                                               log2str("Received unexpected 
port event from Osmux:", port_event));
+               }
+
                /* fail on any unexpected messages */
                [] OSMUX.receive {
                        Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29069
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I962bf4837a9e359576c42a51a9919891186c7100
Gerrit-Change-Number: 29069
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>
Gerrit-MessageType: newchange

Reply via email to