diff options
author | Stefan Sperling <ssperling@sysmocom.de> | 2018-11-19 17:18:41 +0100 |
---|---|---|
committer | Stefan Sperling <ssperling@sysmocom.de> | 2018-11-19 17:30:37 +0100 |
commit | 797558ea1768e464f9559c5f7a4f3f4285c5de25 (patch) | |
tree | 6e03a9424741aabfd21994afa9256f2001a33a2f /src/gb | |
parent | 5a25c3ec4dcb6d3789c6ce94e3c3a165cc5c04d8 (diff) |
send NS_POUT_UNBLOCK_ACK before signalling S_NS_UNBLOCK
In gprs_ns_process_msg(), we were dispatching the S_NS_UNBLOCK
signal before sending out the NS_POUT_UNBLOCK_ACK message.
Signal handlers might send messages to the other side, assuming
that NS is now unblocked. However, since such messages will arrive
before the UNBLOCK_ACK message the receiver might discard them.
This problem has been observed with our TTCN3 BSSGP_Emulation
as a peer to osmo-pcu.
This patch makes TTCN3 PCU TC_paging() test pass regardless of
whether the test or osmo-pcu is started first. Before this patch,
this test would only pass if the test was started before osmo-pcu.
A remaining problem is that the test does not yet keep passing
reliably unless osmo-pcu is restarted between test runs.
Change-Id: I3af54a14bb6bcfa167c9a9d9f67835e7f5b9f1bb
Related: OS#2890
Related: OS#2388
Diffstat (limited to 'src/gb')
-rw-r--r-- | src/gb/gprs_ns.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gb/gprs_ns.c b/src/gb/gprs_ns.c index 198ead19..0780f2bb 100644 --- a/src/gb/gprs_ns.c +++ b/src/gb/gprs_ns.c @@ -1413,8 +1413,10 @@ int gprs_ns_process_msg(struct gprs_ns_inst *nsi, struct msgb *msg, /* Section 7.2: unblocking procedure */ LOGP(DNS, LOGL_INFO, "NSEI=%u Rx NS UNBLOCK\n", (*nsvc)->nsei); ns_mark_unblocked(*nsvc); - ns_osmo_signal_dispatch(*nsvc, S_NS_UNBLOCK, 0); rc = gprs_ns_tx_simple(*nsvc, NS_PDUT_UNBLOCK_ACK); + if (rc < 0) + break; + ns_osmo_signal_dispatch(*nsvc, S_NS_UNBLOCK, 0); break; case NS_PDUT_UNBLOCK_ACK: LOGP(DNS, LOGL_INFO, "NSEI=%u Rx NS UNBLOCK ACK\n", (*nsvc)->nsei); |