pespin has uploaded this change for review.
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(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/78/43878/1
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 change 43878. To unsubscribe, or for help writing mail filters, visit settings.