Change in libosmocore[master]: gprs_ns2: fix nsvc block and unblock vty command

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/.

laforge gerrit-no-reply at lists.osmocom.org
Tue Apr 13 11:25:46 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/23738 )

Change subject: gprs_ns2: fix nsvc block and unblock vty command
......................................................................

gprs_ns2: fix nsvc block and unblock vty command

e7dfeac8dcb3 introduced a regression in the block/unblock check
as it was using the priv->initiate_block instead of priv->om_blocked.
The initiate_block tracks who is responsible to unblock the NSVC.

Fixes: e7dfeac8dcb3 ("gprs_ns2_vty: print a response to vty `nsvc <nsvci> (block|unblock|reset)")
Change-Id: I516faea223e30b120a297faed10636daa554be8a
---
M src/gb/gprs_ns2_vc_fsm.c
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/src/gb/gprs_ns2_vc_fsm.c b/src/gb/gprs_ns2_vc_fsm.c
index 9a6bfc2..7ed8299 100644
--- a/src/gb/gprs_ns2_vc_fsm.c
+++ b/src/gb/gprs_ns2_vc_fsm.c
@@ -785,7 +785,7 @@
 int ns2_vc_block(struct gprs_ns2_vc *nsvc)
 {
 	struct gprs_ns2_vc_priv *priv = nsvc->fi->priv;
-	if (priv->initiate_block)
+	if (priv->om_blocked)
 		return -EALREADY;
 
 	return osmo_fsm_inst_dispatch(nsvc->fi, GPRS_NS2_EV_REQ_OM_BLOCK, NULL);
@@ -797,7 +797,7 @@
 int ns2_vc_unblock(struct gprs_ns2_vc *nsvc)
 {
 	struct gprs_ns2_vc_priv *priv = nsvc->fi->priv;
-	if (!priv->initiate_block)
+	if (!priv->om_blocked)
 		return -EALREADY;
 
 	return osmo_fsm_inst_dispatch(nsvc->fi, GPRS_NS2_EV_REQ_OM_UNBLOCK, NULL);

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I516faea223e30b120a297faed10636daa554be8a
Gerrit-Change-Number: 23738
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210413/554b250d/attachment.htm>


More information about the gerrit-log mailing list