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
This commit is contained in:
Vadim Yanitskiy 2022-07-22 17:27:38 +07:00
parent ae0bb5e1c7
commit 71eb55f3f9
3 changed files with 6 additions and 6 deletions

View File

@ -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);

View File

@ -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");

View File

@ -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();