Change in libosmocore[master]: document unblock-ack vs. signalling in gprs_ns_process_msg()

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Stefan Sperling gerrit-no-reply at lists.osmocom.org
Tue Nov 20 10:14:14 UTC 2018


Stefan Sperling has submitted this change and it was merged. ( https://gerrit.osmocom.org/11839 )

Change subject: document unblock-ack vs. signalling in gprs_ns_process_msg()
......................................................................

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
---
M src/gb/gprs_ns.c
1 file changed, 6 insertions(+), 0 deletions(-)

Approvals:
  Pau Espin Pedrol: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/gb/gprs_ns.c b/src/gb/gprs_ns.c
index 0780f2b..1281c9f 100644
--- a/src/gb/gprs_ns.c
+++ b/src/gb/gprs_ns.c
@@ -1413,9 +1413,15 @@
 		/* 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:

-- 
To view, visit https://gerrit.osmocom.org/11839
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I4b93853c952a97302f8afc14f462f22c3e487564
Gerrit-Change-Number: 11839
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Sperling <ssperling at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Stefan Sperling <ssperling at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181120/e8be4f92/attachment.htm>


More information about the gerrit-log mailing list