diff options
author | Max <msuraev@sysmocom.de> | 2017-09-06 18:20:36 +0200 |
---|---|---|
committer | Max <msuraev@sysmocom.de> | 2017-09-23 10:13:55 +0000 |
commit | dc10ce90b29d42557f3d8c9499a320ffcc3a91c8 (patch) | |
tree | 2fda03fe73794a4862a825f1ccf8c3c875dbcabf /src/libbsc/chan_alloc.c | |
parent | 53daffbd994a47259868dee8f808123a31be9082 (diff) |
Wrap channel state assignment in macro
Previously we've used function so debug print always pointed to the same
place which is not very useful. Wrap it with macro so proper
file:line is printed. Also, make sure that we always change state only
through this wrapper and log only when the state has changed.
Change-Id: I21789f8021290965b61a54a2b23177ccbbfe8321
Diffstat (limited to 'src/libbsc/chan_alloc.c')
-rw-r--r-- | src/libbsc/chan_alloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libbsc/chan_alloc.c b/src/libbsc/chan_alloc.c index 679ad4203..f0275bc96 100644 --- a/src/libbsc/chan_alloc.c +++ b/src/libbsc/chan_alloc.c @@ -448,7 +448,7 @@ void lchan_reset(struct gsm_lchan *lchan) osmo_timer_del(&lchan->error_timer); lchan->type = GSM_LCHAN_NONE; - lchan->state = LCHAN_S_NONE; + rsl_lchan_set_state(lchan, LCHAN_S_NONE); if (lchan->abis_ip.rtp_socket) { rtp_socket_free(lchan->abis_ip.rtp_socket); |