reset: remove name variable from reset context
The reset context contains a string buffer to allow for setting
a human readable name, that is then displayed in the logs. Since
OSMO-FSMs already have such a feature there is no need for an
extra name variable.
Use LOGPFSML and the name parameter of osmo_fsm_inst_alloc()
to display the name of the FSM
Fixes: Coverity CID#178664
Change-Id: I5b051606791c5e085ca6bb1be20592127d48ceb5
diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c
index 4892fb8..bdfef87 100644
--- a/src/libmsc/a_iface.c
+++ b/src/libmsc/a_iface.c
@@ -460,6 +460,7 @@
{
struct bsc_context *bsc_ctx;
struct osmo_ss7_instance *ss7;
+ char bsc_name[32];
OSMO_ASSERT(bsc_addr);
OSMO_ASSERT(msc_addr);
@@ -482,7 +483,8 @@
llist_add_tail(&bsc_ctx->list, &gsm_network->a.bscs);
/* Start reset procedure to make the new connection active */
- bsc_ctx->reset = a_reset_alloc(bsc_ctx, osmo_sccp_addr_name(ss7, bsc_addr), a_reset_cb, bsc_ctx);
+ snprintf(bsc_name, sizeof(bsc_name), "bsc-%i", bsc_addr->pc);
+ bsc_ctx->reset = a_reset_alloc(bsc_ctx, bsc_name, a_reset_cb, bsc_ctx);
}
/* Callback function, called by the SSCP stack when data arrives */