diff options
author | Stefan Sperling <ssperling@sysmocom.de> | 2018-11-20 11:01:36 +0100 |
---|---|---|
committer | Stefan Sperling <ssperling@sysmocom.de> | 2018-11-20 11:06:05 +0100 |
commit | c6bfc63d10f971fbca8e2fd617ffc6b18ab16748 (patch) | |
tree | 4b1f637237e0d45d09ecd4a158db05a6c66469dc /src/gb | |
parent | 797558ea1768e464f9559c5f7a4f3f4285c5de25 (diff) |
document unblock-ack vs. signalling in gprs_ns_process_msg()
Since commit 797558ea1768e464f9559c5f7a4f3f4285c5de25 we send the
NS_UNBLOCK_ACK message before dispatching the NS_UNBLOCK signal,
instead of afterwards.
Add comments which explain the intended order of events.
Suggested-by: Pau
Related: OS#2388
Change-Id: I4b93853c952a97302f8afc14f462f22c3e487564
Diffstat (limited to 'src/gb')
-rw-r--r-- | src/gb/gprs_ns.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gb/gprs_ns.c b/src/gb/gprs_ns.c index 0780f2bb..1281c9f4 100644 --- a/src/gb/gprs_ns.c +++ b/src/gb/gprs_ns.c @@ -1413,9 +1413,15 @@ 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); + /* This UNBLOCK_ACK message will cause our peer to move us into NS_UNBLOCKED state. */ rc = gprs_ns_tx_simple(*nsvc, NS_PDUT_UNBLOCK_ACK); if (rc < 0) break; + /* + * UNBLOCK_ACK has been transmitted. + * Signal handlers may send additional messages following UNBLOCK_ACK under + * the assumption that NS is now in UNBLOCKED state at our peer's end. + */ ns_osmo_signal_dispatch(*nsvc, S_NS_UNBLOCK, 0); break; case NS_PDUT_UNBLOCK_ACK: |