diff options
author | Holger Freyther <zecke@selfish.org> | 2009-06-06 13:54:35 +0000 |
---|---|---|
committer | Holger Freyther <zecke@selfish.org> | 2009-06-06 13:54:35 +0000 |
commit | 7c19f74084f9eaa4565d34af405d3526e3bbc27b (patch) | |
tree | 43f4fcfa091f82df633d824197772bdd8806b58a /src/chan_alloc.c | |
parent | c7b86f90119ef70e4b26df689da6026c67f5d4c4 (diff) |
lchan: Handle the abnormal case of channel getting closed
The abnormal case is that lchan_free ist getting called due
a RSL_MT_CHAN_REL_ACK in the RSL but the refcount of this
channel is not zero. This means that some "logical operation"
is still going on that needs to be cancelled.
Instead of always queuing up all operations in the
struct gsm_lchan use the signal framework to inform higher
layers about this abnormal case.
In gsm_04_08.c a signal handler is installed and in the
abnormal case the location updating request operation is
freed.
Diffstat (limited to 'src/chan_alloc.c')
-rw-r--r-- | src/chan_alloc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/chan_alloc.c b/src/chan_alloc.c index fa07273fa..77a4f57bc 100644 --- a/src/chan_alloc.c +++ b/src/chan_alloc.c @@ -31,6 +31,7 @@ #include <openbsc/abis_nm.h> #include <openbsc/abis_rsl.h> #include <openbsc/debug.h> +#include <openbsc/signal.h> static void auto_release_channel(void *_lchan); @@ -193,8 +194,9 @@ void lchan_free(struct gsm_lchan *lchan) lchan->subscr = 0; } - /* We might kill an active channel... FIXME: call cancellations */ + /* We might kill an active channel... */ if (lchan->use_count != 0) { + dispatch_signal(SS_LCHAN, S_LCHAN_UNEXPECTED_RELEASE, lchan); lchan->use_count = 0; } |