[PATCH] osmocom-bb[master]: host/trxcon: fix: use valid names for FSM instances

Harald Welte gerrit-no-reply at lists.osmocom.org
Thu Feb 22 15:33:25 UTC 2018

Review at  https://gerrit.osmocom.org/6784

host/trxcon: fix: use valid names for FSM instances

Since 8c4f5457 in libosmocore there are some limitations on FSM
and FSM instance names. This change adjusts the names of both
l1ctl_fsm and trx_fsm instances.

Change-Id: Icaaac3f51bdcfe4f7723060179b8730c3a06529b
M src/host/trxcon/l1ctl_link.c
M src/host/trxcon/trx_if.c
2 files changed, 2 insertions(+), 5 deletions(-)

  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/84/6784/1

diff --git a/src/host/trxcon/l1ctl_link.c b/src/host/trxcon/l1ctl_link.c
index 3bbdf34..3905654 100644
--- a/src/host/trxcon/l1ctl_link.c
+++ b/src/host/trxcon/l1ctl_link.c
@@ -268,7 +268,7 @@
 	/* Allocate a new dedicated state machine */
 	l1l_new->fsm = osmo_fsm_inst_alloc(&l1ctl_fsm, l1l_new,
-		NULL, LOGL_DEBUG, sock_path);
+		NULL, LOGL_DEBUG, "l1ctl_link");
 	*l1l = l1l_new;
diff --git a/src/host/trxcon/trx_if.c b/src/host/trxcon/trx_if.c
index 6a84af6..d7f496e 100644
--- a/src/host/trxcon/trx_if.c
+++ b/src/host/trxcon/trx_if.c
@@ -628,7 +628,6 @@
 int trx_if_open(struct trx_instance **trx, const char *host, uint16_t port)
 	struct trx_instance *trx_new;
-	char *inst_name;
 	int rc;
 	LOGP(DTRX, LOGL_NOTICE, "Init transceiver interface\n");
@@ -656,10 +655,8 @@
 	/* Allocate a new dedicated state machine */
-	inst_name = talloc_asprintf(trx_new, "%s:%u", host, port);
 	trx_new->fsm = osmo_fsm_inst_alloc(&trx_fsm, trx_new,
-		NULL, LOGL_DEBUG, inst_name);
-	talloc_free(inst_name);
+		NULL, LOGL_DEBUG, "trx_interface");
 	*trx = trx_new;

To view, visit https://gerrit.osmocom.org/6784
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icaaac3f51bdcfe4f7723060179b8730c3a06529b
Gerrit-PatchSet: 1
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>

More information about the gerrit-log mailing list