pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43878?usp=email )

Change subject: PFCP_Emulation: Support repeat in as_pfcp_handle_heartbeat_req()
......................................................................

PFCP_Emulation: Support repeat in as_pfcp_handle_heartbeat_req()

This is needed for instance when activating the altstep and then doing
an explicit receive alt on another message on the same port, otherwise a
received HB REQ will skip receiving the explicit message.

Change-Id: I99b8f63e558197d70273fd6b89adaa0470da772d
---
M library/PFCP_Emulation.ttcn
1 file changed, 5 insertions(+), 2 deletions(-)

Approvals:
  fixeria: Looks good to me, but someone else must approve
  osmith: Looks good to me, approved
  Jenkins Builder: Verified




diff --git a/library/PFCP_Emulation.ttcn b/library/PFCP_Emulation.ttcn
index ad00561..f07475a 100644
--- a/library/PFCP_Emulation.ttcn
+++ b/library/PFCP_Emulation.ttcn
@@ -404,7 +404,7 @@
 }

 /* Wait for peer to send a PFCP HEARTBEAT REQ to us, answer it */
-altstep as_pfcp_handle_heartbeat_req(integer tx_recovery_timestamp)
+altstep as_pfcp_handle_heartbeat_req(integer tx_recovery_timestamp, boolean 
do_repeat := false)
 runs on PFCP_ConnHdlr {
        var PDU_PFCP m;

@@ -413,6 +413,9 @@
                tx_pfcp := 
valueof(ts_PFCP_Heartbeat_Resp(tx_recovery_timestamp));
                tx_pfcp.sequence_number := m.sequence_number;
                PFCP.send(tx_pfcp);
+               if (do_repeat) {
+                       repeat;
+               }
                }
 }

@@ -495,7 +498,7 @@
                        repeat;
                }
        }
-       [] as_pfcp_handle_heartbeat_req(rts) { repeat; }
+       [] as_pfcp_handle_heartbeat_req(rts, do_repeat := true);
        [fail_rx_others] PFCP.receive(PDU_PFCP:?) -> value m {
                        Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
                                                log2str("Got an unexpected PFCP 
message ", m, " vs exp ", tr_PFCP_Assoc_Setup_Req()));

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43878?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: I99b8f63e558197d70273fd6b89adaa0470da772d
Gerrit-Change-Number: 43878
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>

Reply via email to