NS_Emulation: Tolerate late NS-BLOCK-ACK / NS-UNBLOCK-ACK
Particularly in case both sides initiate a BLOCK or UNBLOCK procedure
at almost the same time, it can happen thet we're already in BLOCKED
state and receive a late BLOCK-ACK or in UNBLOCKED state and receive a
late UNBLOCK-ACK.
Let's just silently discard them instaed of generating NS-STATUS which
may confuse the peer.
Change-Id: I2e5b934e1cf6c6cf982d5ab1dbb32e8920b91071
diff --git a/library/NS_Emulation.ttcnpp b/library/NS_Emulation.ttcnpp
index ab1c136..2ccd399 100644
--- a/library/NS_Emulation.ttcnpp
+++ b/library/NS_Emulation.ttcnpp
@@ -561,6 +561,9 @@
Tns_block.stop;
f_change_state(NSVC_S_ALIVE_UNBLOCKED);
}
+ /* tolerate a late NS-BLOCK-ACK from peer */
+ [] NSCP.receive(tr_NS_BLOCK_ACK(g_nsvc_config.nsvci)) -> value rf {
+ }
[] Tns_block.timeout {
/* repeat unblock transmission */
f_sendUnblock();
@@ -583,6 +586,9 @@
[] NSCP.receive(tr_NS_BLOCK_ACK(g_nsvc_config.nsvci)) -> value rf {
Tns_block.stop;
}
+ /* tolerate a late NS-UNBLOCK-ACK from peer */
+ [] NSCP.receive(t_NS_UNBLOCK_ACK) -> value rf {
+ }
/* NS-UNITDATA PDU from network to NS-UNITDATA.ind to user */
[] NSCP.receive(tr_NS_UNITDATA(?, ?, ?)) -> value rf {
NS_SP.send(ts_NsUdInd(g_config.nsei, g_nsvc_config.nsvci,