aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2021-01-18 14:01:01 +0100
committerAlexander Couzens <lynxis@fe80.eu>2021-01-20 13:04:33 +0100
commitea01bf2b293727f162665672c440d2190a038778 (patch)
treec27274a350798e4eeb8bfff262769124bf4a6cc8
parentf577543887e641b6152127653f18d24a897d64b7 (diff)
gprs_ns2_vc_fsm: ensure all state is resetted via force_unconf
-rw-r--r--src/gb/gprs_ns2_vc_fsm.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gb/gprs_ns2_vc_fsm.c b/src/gb/gprs_ns2_vc_fsm.c
index 8a78e571..60c46e69 100644
--- a/src/gb/gprs_ns2_vc_fsm.c
+++ b/src/gb/gprs_ns2_vc_fsm.c
@@ -57,6 +57,7 @@ struct gprs_ns2_vc_priv {
int N;
/* The initiator is responsible to UNBLOCK the VC. The BSS is usually the initiator.
* It can change during runtime. The side which blocks an unblocked side.*/
+ bool initiator;
bool initiate_block;
bool initiate_reset;
/* if blocked by O&M/vty */
@@ -228,6 +229,9 @@ static void gprs_ns2_st_unconfigured(struct osmo_fsm_inst *fi, uint32_t event, v
struct gprs_ns2_vc_priv *priv = fi->priv;
struct gprs_ns2_inst *nsi = priv->nsvc->nse->nsi;
+ priv->initiate_reset = priv->initiate_block = priv->initiator;
+ priv->om_blocked = false;
+
switch (event) {
case GPRS_NS2_EV_REQ_START:
switch (priv->nsvc->mode) {
@@ -690,8 +694,7 @@ struct osmo_fsm_inst *gprs_ns2_vc_fsm_alloc(struct gprs_ns2_vc *nsvc,
nsvc->fi = fi;
priv = fi->priv = talloc_zero(fi, struct gprs_ns2_vc_priv);
priv->nsvc = nsvc;
- priv->initiate_reset = initiator;
- priv->initiate_block = initiator;
+ priv->initiator = initiator;
osmo_timer_setup(&priv->alive.timer, alive_timeout_handler, fi);