diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-06-22 12:54:20 +0800 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-06-22 12:55:57 +0800 |
commit | 539b8ed99f5f227ffd5d783ba3c7a38b26fb1760 (patch) | |
tree | e225382c77d3af757a5a3eaf1e5230d9b90403e0 /openbsc/src | |
parent | d7cb8aa275101cb7b59d2f40fed5d8b8041987ff (diff) |
bssap.c: handle CHAN Activate NACK...
This was previously handled by the unexpected release
lchan handling for the secondary channel, we will now
just set the secondary_lchan pointer back to NULL and
let the framework free the resources.
Diffstat (limited to 'openbsc/src')
-rw-r--r-- | openbsc/src/bssap.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/openbsc/src/bssap.c b/openbsc/src/bssap.c index dbb7e8808..4f8efd817 100644 --- a/openbsc/src/bssap.c +++ b/openbsc/src/bssap.c @@ -1071,6 +1071,20 @@ static int bssap_handle_lchan_signal(unsigned int subsys, unsigned int signal, case S_LCHAN_ACTIVATE_ACK: continue_new_assignment(lchan); break; + case S_LCHAN_ACTIVATE_NACK: + if (lchan->msc_data && lchan->msc_data->secondary_lchan == lchan) { + LOGP(DMSC, LOGL_ERROR, "Activating a secondary lchan failed.\n"); + + /* + * The channel will be freed, so let us forget about it, T10 will + * fire and we will send the assignment failure to the network. We + * do not give up the refcount so we will get another unexpected + * release... but that will be handled just fine. + */ + lchan->msc_data->secondary_lchan = NULL; + lchan->msc_data = NULL; + } + break; } break; } |