bscnat: Fix race condition in TC_ctrl_location
Change-Id: Ifb5a2a9936fff94511a6bd11bd8e155a3d3e2d82
diff --git a/bsc-nat/BSC_MS_Simulation.ttcn b/bsc-nat/BSC_MS_Simulation.ttcn
index 453f304..0582576 100644
--- a/bsc-nat/BSC_MS_Simulation.ttcn
+++ b/bsc-nat/BSC_MS_Simulation.ttcn
@@ -10,6 +10,7 @@
* SPDX-License-Identifier: GPL-2.0-or-later
*/
+import from Osmocom_Types all;
import from IPL4asp_Types all;
import from IPA_Emulation all;
@@ -83,6 +84,10 @@
f_ctrl_trap(SCCPLITE_IPA_CTRL, "bts.0.location-state",
"1234567,fix3d,0.340000,0.560000,0.780000,operational,unlocked,on,001,01");
f_ctrl_exp_set(SCCPLITE_IPA_CTRL, "rf_locked", "1", "1");
+ /* Leave some time for SET_REPLY to reach the other side before closing
+ conn towards BSC-NAT, otherwise TCP FIN is sent before SET_REPLY and
+ bsc-nat sends a CTRL ERR to whoever sent the SET cmd. */
+ f_sleep(1.0);
}
function main(charstring remote_ip, PortNumber remote_port,