aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Freyther <zecke@selfish.org>2009-04-12 04:36:16 +0000
committerHolger Freyther <zecke@selfish.org>2009-04-12 04:36:16 +0000
commit3190a89e386183d9e17264c5d30f42bba5d8b03e (patch)
tree62f2f9d1993433843e9f6851905da8afa00e7970
parent0469cf608b55003666359eeb0b9376540bcae7dd (diff)
[calls] Remove a tautology from gsm48_cc_rx_disconnect
We directly assign the call->state and then check for something that will never be true, and then immediately put the lchan and schedule it's disconnect... and then directly after having closed it down we send a message... Change this to uncondtionally put down the lchan after having changed the last(?) command.
-rw-r--r--src/gsm_04_08.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gsm_04_08.c b/src/gsm_04_08.c
index deafe7b2f..4b2ecdc65 100644
--- a/src/gsm_04_08.c
+++ b/src/gsm_04_08.c
@@ -1202,12 +1202,11 @@ static int gsm48_cc_rx_disconnect(struct msgb *msg)
/* Section 5.4.3.2 */
DEBUGP(DCC, "A -> DISCONNECT (state->RELEASE_REQ)\n");
call->state = GSM_CSTATE_RELEASE_REQ;
- if (call->state != GSM_CSTATE_NULL)
- put_lchan(msg->lchan);
/* FIXME: clear the network connection */
DEBUGP(DCC, "A <- RELEASE\n");
rc = gsm48_tx_simple(msg->lchan, GSM48_PDISC_CC,
GSM48_MT_CC_RELEASE);
+ put_lchan(msg->lchan);
/* forward DISCONNECT to other party */
if (!call->remote_lchan)