aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2017-11-24 11:39:10 +0100
committerHarald Welte <laforge@gnumonks.org>2017-12-01 12:01:59 +0000
commitb8acdcdf2ef4777a568b14526e4a9fdb9ba2ac74 (patch)
tree85b711b723af6eeec6d7208c5aefeaef3be480bb
parent5f1de85fab81176c7eeb5094635eae760cfc045c (diff)
cosmetic: remove duplicate logging
The log output of the reset FSM duplicates lots of the built in FSM log output. Remove duplicate logging, use more expressive log messages where needed. Change-Id: Ie031d947a5b8097bd656c0271081af215605ba02
-rw-r--r--src/libcommon-cs/a_reset.c26
1 files changed, 2 insertions, 24 deletions
diff --git a/src/libcommon-cs/a_reset.c b/src/libcommon-cs/a_reset.c
index 32c00ae53..3ee0058fc 100644
--- a/src/libcommon-cs/a_reset.c
+++ b/src/libcommon-cs/a_reset.c
@@ -38,34 +38,19 @@ enum fsm_states {
ST_CONN, /* We have a confirmed connection */
};
-static const struct value_string fsm_state_names[] = {
- {ST_DISC, "ST_DISC (disconnected)"},
- {ST_CONN, "ST_CONN (connected)"},
- {0, NULL},
-};
-
enum fsm_evt {
EV_RESET_ACK, /* got reset acknowlegement from remote end */
EV_N_DISCONNECT, /* lost a connection */
EV_N_CONNECT, /* made a successful connection */
};
-static const struct value_string fsm_evt_names[] = {
- {EV_RESET_ACK, "EV_RESET_ACK"},
- {EV_N_DISCONNECT, "EV_N_DISCONNECT"},
- {EV_N_CONNECT, "EV_N_CONNECT"},
- {0, NULL},
-};
-
/* Disconnected state */
static void fsm_disc_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data)
{
struct a_reset_ctx *reset = (struct a_reset_ctx *)data;
OSMO_ASSERT(reset);
OSMO_ASSERT(reset->fsm);
-
- LOGPFSML(reset->fsm, LOGL_NOTICE, "fsm-state (msc-reset): %s, fsm-event: %s\n",
- get_value_string(fsm_state_names, ST_CONN), get_value_string(fsm_evt_names, event));
+ LOGPFSML(reset->fsm, LOGL_NOTICE, "SIGTRAN connection succeded.\n");
reset->conn_loss_counter = 0;
osmo_fsm_inst_state_chg(fi, ST_CONN, 0, 0);
@@ -77,9 +62,6 @@ static void fsm_conn_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data)
struct a_reset_ctx *reset = (struct a_reset_ctx *)data;
OSMO_ASSERT(reset);
- LOGPFSML(reset->fsm, LOGL_NOTICE, "fsm-state (msc-reset): %s, fsm-event: %s\n",
- get_value_string(fsm_state_names, ST_CONN), get_value_string(fsm_evt_names, event));
-
switch (event) {
case EV_N_DISCONNECT:
if (reset->conn_loss_counter >= BAD_CONNECTION_THRESOLD) {
@@ -100,8 +82,7 @@ static int fsm_reset_ack_timeout_cb(struct osmo_fsm_inst *fi)
struct a_reset_ctx *reset = (struct a_reset_ctx *)fi->priv;
OSMO_ASSERT(reset->fsm);
- LOGPFSML(reset->fsm, LOGL_NOTICE, "reset-ack timeout (T%i) in state %s, resending...\n", fi->T,
- get_value_string(fsm_state_names, fi->state));
+ LOGPFSML(reset->fsm, LOGL_NOTICE, "(re)sending BSSMAP RESET message...\n");
reset->cb(reset->priv);
@@ -153,7 +134,6 @@ struct a_reset_ctx *a_reset_alloc(const void *ctx, const char *name, void *cb, v
reset->fsm = osmo_fsm_inst_alloc(&fsm, NULL, NULL, LOGL_DEBUG, name);
OSMO_ASSERT(reset->fsm);
reset->fsm->priv = reset;
- LOGPFSML(reset->fsm, LOGL_NOTICE, "reset handler fsm created.\n");
/* kick off reset-ack sending mechanism */
osmo_fsm_inst_state_chg(reset->fsm, ST_DISC, RESET_RESEND_INTERVAL, RESET_RESEND_TIMER_NO);
@@ -172,8 +152,6 @@ void a_reset_free(struct a_reset_ctx *reset)
memset(reset, 0, sizeof(*reset));
talloc_free(reset);
-
- LOGPFSML(reset->fsm, LOGL_NOTICE, "reset handler fsm destroyed.\n");
}
/* Confirm that we sucessfully received a reset acknowlege message */