diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2013-01-21 09:01:29 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2013-01-25 18:34:39 +0100 |
commit | 49e06653b3d2f29c2d7d085c8d2aad57f27baeb3 (patch) | |
tree | 059a6fa26930b874c3f8e83b59612ac99bb31823 | |
parent | e7ea08379e1b8aa13e6db52558fbdd17002d0e3e (diff) |
rsl: Re-introduce the SACCH deactivation marker
GSM 08.58 is not clear if the SACCH Deactivate is an idempotent operation,
it has exposed a bug in my osmo-bts channel release re-work with the queue
and I assume the nanoBTS will not deal with it any better.
In my tests it was possible to get a N200+1 times error during the channel
release procedure which lead to releasing the SACCH again. When this timeout
occurs it is very difficult to find out if the SACCH was already deactivated.
Re-introduce the usage of the sacch_deact flag in the lchan. When the release
is triggered by higher levels the SACCH should be active and we check for this
with a log message, in case of the error handling we check if the SACCH was
de-activated before de-activating it even if we are requested to do it. This
way we know the SACCH will be de-activated at most once.
-rw-r--r-- | openbsc/src/libbsc/abis_rsl.c | 2 | ||||
-rw-r--r-- | openbsc/src/libbsc/chan_alloc.c | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c index 03ad8da9c..977ea3f7e 100644 --- a/openbsc/src/libbsc/abis_rsl.c +++ b/openbsc/src/libbsc/abis_rsl.c @@ -697,7 +697,7 @@ static int rsl_rf_chan_release(struct gsm_lchan *lchan, int error, /* * sacch de-activate and "local end release" */ - if (deact_sacch == SACCH_DEACTIVATE) + if (deact_sacch == SACCH_DEACTIVATE && !lchan->sacch_deact) rsl_deact_sacch(lchan); rsl_release_sapis_from(lchan, 0, RSL_REL_LOCAL_END); diff --git a/openbsc/src/libbsc/chan_alloc.c b/openbsc/src/libbsc/chan_alloc.c index 9b74329f4..99c93604d 100644 --- a/openbsc/src/libbsc/chan_alloc.c +++ b/openbsc/src/libbsc/chan_alloc.c @@ -344,6 +344,7 @@ void lchan_free(struct gsm_lchan *lchan) lchan->conn = NULL; } + lchan->sacch_deact = 0; /* FIXME: ts_free() the timeslot, if we're the last logical * channel using it */ } @@ -390,6 +391,11 @@ static void _lchan_handle_release(struct gsm_lchan *lchan, gsm48_send_rr_release(lchan); /* Deactivate the SACCH on the BTS side */ + if (lchan->sacch_deact) + LOGP(DRLL, LOGL_ERROR, + "%s sacch already deactivated?!\n", + gsm_lchan_name(lchan)); + lchan->sacch_deact = 1; rsl_deact_sacch(lchan); rsl_start_t3109(lchan); } else if (lchan->sapis[0] == LCHAN_SAPI_UNUSED) { |