[subscriber] Introduce subscr_put_channel
Introduce subscr_put_channel to release a channel and to
allow gsm_subscriber.c to hand this channel to any suitable
pending requests.
diff --git a/src/gsm_04_08.c b/src/gsm_04_08.c
index a9183de..85af502 100644
--- a/src/gsm_04_08.c
+++ b/src/gsm_04_08.c
@@ -1208,7 +1208,13 @@
DEBUGP(DCC, "A <- RELEASE\n");
rc = gsm48_tx_simple(msg->lchan, GSM48_PDISC_CC,
GSM48_MT_CC_RELEASE);
- put_lchan(msg->lchan);
+
+ /*
+ * FIXME: This looks wrong! We should have a single
+ * place to do MMCC-REL-CNF/-REQ/-IND and then switch
+ * to the NULL state and relase the call
+ */
+ subscr_put_channel(msg->lchan);
/* forward DISCONNECT to other party */
if (!call->remote_lchan)
@@ -1294,7 +1300,7 @@
/* need to respond with RELEASE_COMPLETE */
rc = gsm48_tx_simple(msg->lchan, GSM48_PDISC_CC,
GSM48_MT_CC_RELEASE_COMPL);
- put_lchan(msg->lchan);
+ subscr_put_channel(msg->lchan);
call->state = GSM_CSTATE_NULL;
break;
case GSM48_MT_CC_STATUS_ENQ: