diff options
author | Daniel Willmann <daniel@totalueberwachung.de> | 2011-08-11 04:55:45 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2011-08-11 17:21:24 +0200 |
commit | fc462dd59ee4772f06c9f2477b36b3f166a8e74b (patch) | |
tree | 0c12536852c9ce71000a13fc7030dfc61649ca81 | |
parent | 6fc6a12c07f9d834c3c9ff01ec948feea0780953 (diff) |
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.
-rw-r--r-- | openbsc/src/libbsc/chan_alloc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/openbsc/src/libbsc/chan_alloc.c b/openbsc/src/libbsc/chan_alloc.c index c0bdc1be9..6f4fe20f8 100644 --- a/openbsc/src/libbsc/chan_alloc.c +++ b/openbsc/src/libbsc/chan_alloc.c @@ -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; |