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: Ia5af309207476291f88af47878dc1d32b2dada06
diff --git a/src/libcommon-cs/a_reset.c b/src/libcommon-cs/a_reset.c
index 5e45b09..797f8e5 100644
--- a/src/libcommon-cs/a_reset.c
+++ b/src/libcommon-cs/a_reset.c
@@ -38,34 +38,19 @@
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 @@
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 @@
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 @@
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 @@
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 */