summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2022-07-22 17:27:38 +0700
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2022-07-22 17:31:05 +0700
commit71eb55f3f9bc30a23473a6a389000bdead4c0438 (patch)
tree0f9ce89b04ba86277a312cba193321e6474e7c67
parentae0bb5e1c7d43212fa9eded70bc3e09236735588 (diff)
trxcon: l1ctl_server_{start,shutdown}() -> l1ctl_server_{alloc,free}()
l1ctl_server_start() does not actually start the server, it simply allocates memory and initializes it. l1ctl_server_shutdown() does the opposite. Let's use more precise symbol names. Change-Id: Ie039abdff3911c5b566c760b26c31203824c5764
-rw-r--r--src/host/trxcon/include/osmocom/bb/trxcon/l1ctl_server.h4
-rw-r--r--src/host/trxcon/src/l1ctl_server.c4
-rw-r--r--src/host/trxcon/src/trxcon.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/src/host/trxcon/include/osmocom/bb/trxcon/l1ctl_server.h b/src/host/trxcon/include/osmocom/bb/trxcon/l1ctl_server.h
index 003d1463..94c0a9cf 100644
--- a/src/host/trxcon/include/osmocom/bb/trxcon/l1ctl_server.h
+++ b/src/host/trxcon/include/osmocom/bb/trxcon/l1ctl_server.h
@@ -54,8 +54,8 @@ struct l1ctl_client {
void *priv;
};
-struct l1ctl_server *l1ctl_server_start(void *ctx, const struct l1ctl_server_cfg *cfg);
-void l1ctl_server_shutdown(struct l1ctl_server *server);
+struct l1ctl_server *l1ctl_server_alloc(void *ctx, const struct l1ctl_server_cfg *cfg);
+void l1ctl_server_free(struct l1ctl_server *server);
int l1ctl_client_send(struct l1ctl_client *client, struct msgb *msg);
void l1ctl_client_conn_close(struct l1ctl_client *client);
diff --git a/src/host/trxcon/src/l1ctl_server.c b/src/host/trxcon/src/l1ctl_server.c
index 8d57fff1..88279008 100644
--- a/src/host/trxcon/src/l1ctl_server.c
+++ b/src/host/trxcon/src/l1ctl_server.c
@@ -206,7 +206,7 @@ void l1ctl_client_conn_close(struct l1ctl_client *client)
talloc_free(client);
}
-struct l1ctl_server *l1ctl_server_start(void *ctx, const struct l1ctl_server_cfg *cfg)
+struct l1ctl_server *l1ctl_server_alloc(void *ctx, const struct l1ctl_server_cfg *cfg)
{
struct l1ctl_server *server;
int rc;
@@ -239,7 +239,7 @@ struct l1ctl_server *l1ctl_server_start(void *ctx, const struct l1ctl_server_cfg
return server;
}
-void l1ctl_server_shutdown(struct l1ctl_server *server)
+void l1ctl_server_free(struct l1ctl_server *server)
{
LOGP(DL1C, LOGL_NOTICE, "Shutdown L1CTL server\n");
diff --git a/src/host/trxcon/src/trxcon.c b/src/host/trxcon/src/trxcon.c
index 7fa774d9..1e122936 100644
--- a/src/host/trxcon/src/trxcon.c
+++ b/src/host/trxcon/src/trxcon.c
@@ -563,7 +563,7 @@ int main(int argc, char **argv)
.conn_close_cb = &l1ctl_conn_close_cb,
};
- server = l1ctl_server_start(tall_trxcon_ctx, &server_cfg);
+ server = l1ctl_server_alloc(tall_trxcon_ctx, &server_cfg);
if (server == NULL) {
rc = EXIT_FAILURE;
goto exit;
@@ -587,7 +587,7 @@ int main(int argc, char **argv)
exit:
if (server != NULL)
- l1ctl_server_shutdown(server);
+ l1ctl_server_free(server);
/* Deinitialize logging */
log_fini();