aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-06-22 12:54:20 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-06-22 12:55:57 +0800
commit539b8ed99f5f227ffd5d783ba3c7a38b26fb1760 (patch)
treee225382c77d3af757a5a3eaf1e5230d9b90403e0
parentd7cb8aa275101cb7b59d2f40fed5d8b8041987ff (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.
-rw-r--r--openbsc/src/bssap.c14
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;
}