This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has submitted this change and it was merged.
Change subject: cosmetic: remove duplicate logging
......................................................................
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
---
M src/libcommon-cs/a_reset.c
1 file changed, 2 insertions(+), 24 deletions(-)
Approvals:
Harald Welte: Looks good to me, approved
Jenkins Builder: Verified
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,23 +38,10 @@
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 */
@@ -63,9 +50,7 @@
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);
@@ -76,9 +61,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:
@@ -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 */
--
To view, visit https://gerrit.osmocom.org/5074
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia5af309207476291f88af47878dc1d32b2dada06
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder