diff options
author | Alexander Couzens <lynxis@fe80.eu> | 2021-04-13 12:26:57 +0200 |
---|---|---|
committer | Alexander Couzens <lynxis@fe80.eu> | 2021-04-13 12:38:44 +0200 |
commit | 79a3a84b159072e91e0f39d52e9d604f3380213e (patch) | |
tree | d1f18b90845d5d06a28165ca2869c9a6a8da2011 | |
parent | 4b46b7eb53a26f975ff96af96d7351b289a57889 (diff) |
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
-rw-r--r-- | src/gb/gprs_ns2_vc_fsm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gb/gprs_ns2_vc_fsm.c b/src/gb/gprs_ns2_vc_fsm.c index 9a6bfc23..7ed82997 100644 --- a/src/gb/gprs_ns2_vc_fsm.c +++ b/src/gb/gprs_ns2_vc_fsm.c @@ -785,7 +785,7 @@ int ns2_vc_force_unconfigured(struct gprs_ns2_vc *nsvc) 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_block(struct gprs_ns2_vc *nsvc) 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); |