aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libbsc/abis_rsl.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-08-24 16:48:00 +0200
committerHarald Welte <laforge@gnumonks.org>2016-08-27 02:23:47 +0000
commit423269f8035f107d5bc76e10cf17728fdbb3e2e4 (patch)
treeae05401bff2d97820bf532a158a8f8759b6d07d9 /openbsc/src/libbsc/abis_rsl.c
parentbaa6c5546e719757073fa97fcc4b1f0d32c39165 (diff)
log: improve for rsl_lchan_mark_broken()
In rsl_lchan_mark_broken(), call rsl_lchan_set_state() so the state transition gets logged in the debug log. Remove logging for the broken channel at the callers, instead log the error actually in rsl_lchan_mark_broken() itself, with the reason message passed by the caller anyway. (Removes code dup and ensures it's always logged.) Change-Id: I54ae9bbd3f193bae7b1bda1fef3e33e62b353bf5
Diffstat (limited to 'openbsc/src/libbsc/abis_rsl.c')
-rw-r--r--openbsc/src/libbsc/abis_rsl.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c
index 5a53d19ab..d9ca55049 100644
--- a/openbsc/src/libbsc/abis_rsl.c
+++ b/openbsc/src/libbsc/abis_rsl.c
@@ -179,10 +179,6 @@ static void lchan_act_tmr_cb(void *data)
{
struct gsm_lchan *lchan = data;
- LOGP(DRSL, LOGL_ERROR,
- "%s Timeout during activation. Marked as broken.\n",
- gsm_lchan_name(lchan));
-
rsl_lchan_mark_broken(lchan, "activation timeout");
lchan_free(lchan);
}
@@ -191,10 +187,6 @@ static void lchan_deact_tmr_cb(void *data)
{
struct gsm_lchan *lchan = data;
- LOGP(DRSL, LOGL_ERROR,
- "%s Timeout during deactivation! Marked as broken.\n",
- gsm_lchan_name(lchan));
-
rsl_lchan_mark_broken(lchan, "de-activation timeout");
lchan_free(lchan);
}
@@ -1121,7 +1113,9 @@ int rsl_release_request(struct gsm_lchan *lchan, uint8_t link_id,
int rsl_lchan_mark_broken(struct gsm_lchan *lchan, const char *reason)
{
- lchan->state = LCHAN_S_BROKEN;
+ LOGP(DRSL, LOGL_ERROR, "%s %s lchan broken: %s\n",
+ gsm_lchan_name(lchan), gsm_lchant_name(lchan->type), reason);
+ rsl_lchan_set_state(lchan, LCHAN_S_BROKEN);
lchan->broken_reason = reason;
return 0;
}