libbsc: Log if a channel is freed with lchan->state != LCHAN_S_NONE

I'm not sure if that is an abnormal condition or not, but it seems
that lchan state and type have to be none for the lchan to be
considered idle.
This commit is contained in:
Daniel Willmann
2011-08-11 04:55:45 +02:00
committed by Harald Welte
parent 6fc6a12c07
commit fc462dd59e

View File

@@ -299,6 +299,10 @@ void lchan_free(struct gsm_lchan *lchan)
sig.type = lchan->type;
lchan->type = GSM_LCHAN_NONE;
if (lchan->state != LCHAN_S_NONE) {
LOGP(DRLL, LOGL_NOTICE, "Freeing lchan with state %s - setting to NONE\n", gsm_lchans_name(lchan->state));
lchan->state = LCHAN_S_NONE;
}
if (lchan->conn) {
struct lchan_signal_data sig;