From 71eb55f3f9bc30a23473a6a389000bdead4c0438 Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Fri, 22 Jul 2022 17:27:38 +0700 Subject: [PATCH] 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 --- src/host/trxcon/include/osmocom/bb/trxcon/l1ctl_server.h | 4 ++-- src/host/trxcon/src/l1ctl_server.c | 4 ++-- src/host/trxcon/src/trxcon.c | 4 ++-- 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 003d1463b..94c0a9cf2 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 8d57fff10..882790083 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 7fa774d96..1e1229369 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();