aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2017-11-24 11:41:36 +0100
committerPhilipp Maier <pmaier@sysmocom.de>2017-12-01 13:36:30 +0100
commite4cfa74d38d530313ad2ba71b18a3903f2d33f9c (patch)
tree7fc75f7ae545e5b76e870001a7b6af1b8dc81ead
parent06c3f8d3cb0c0ab933b0c246c6c6e6ef5afd42c1 (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: Ia5af309207476291f88af47878dc1d32b2dada06
-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 5e45b0902..797f8e512 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 */