aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2012-04-16 20:14:38 +0200
committerHarald Welte <laforge@gnumonks.org>2012-04-19 09:39:51 +0200
commiteac221b4eae31e5a877040dbe219a8905de393dd (patch)
tree0752ce3bc2658f732fbfdf49dbaa58166ee2b3ea /src
parentf4f69ee6fc19b9f8d4d0af615e752cb88b96eae7 (diff)
lchan: Fix the state transition in the deactivate handler
If the deactivation is failing the channel needs to be moved into and error state, if the deactivation completed the channel needs to be set to the none state and set the state to release reqeust on the deactivation.
Diffstat (limited to 'src')
-rw-r--r--src/osmo-bts-sysmo/oml.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/osmo-bts-sysmo/oml.c b/src/osmo-bts-sysmo/oml.c
index b59f11fb..dba17275 100644
--- a/src/osmo-bts-sysmo/oml.c
+++ b/src/osmo-bts-sysmo/oml.c
@@ -858,12 +858,12 @@ static int lchan_deact_compl_cb(struct msgb *l1_msg, void *data)
if (ic->status == GsmL1_Status_Success) {
DEBUGP(DL1C, "Successful deactivation of L1 SAPI %s on TS %u\n",
get_value_string(femtobts_l1sapi_names, ic->sapi), ic->u8Tn);
- lchan_set_state(lchan, LCHAN_S_ACTIVE);
+ lchan_set_state(lchan, LCHAN_S_NONE);
} else {
LOGP(DL1C, LOGL_ERROR, "Error deactivating L1 SAPI %s on TS %u: %s\n",
get_value_string(femtobts_l1sapi_names, ic->sapi), ic->u8Tn,
get_value_string(femtobts_l1status_names, ic->status));
- lchan_set_state(lchan, LCHAN_S_NONE);
+ lchan_set_state(lchan, LCHAN_S_REL_ERR);
}
switch (ic->sapi) {
@@ -908,7 +908,7 @@ int lchan_deactivate(struct gsm_lchan *lchan)
l1if_req_compl(fl1h, msg, 0, lchan_deact_compl_cb, lchan);
}
- lchan_set_state(lchan, LCHAN_S_ACT_REQ);
+ lchan_set_state(lchan, LCHAN_S_REL_REQ);
lchan->ciph_state = 0; /* FIXME: do this in common/\*.c */
return 0;