Skip to content

Commit

Permalink
console: lxc_terminal_free()
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner committed Feb 27, 2018
1 parent c1ee47c commit 3dfe6f8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/lxc/commands.c
Expand Up @@ -757,7 +757,7 @@ static int lxc_cmd_console_callback(int fd, struct lxc_cmd_req *req,
ret = lxc_abstract_unix_send_fds(fd, &masterfd, 1, &rsp, sizeof(rsp));
if (ret < 0) {
ERROR("Failed to send tty to client");
lxc_console_free(handler->conf, fd);
lxc_terminal_free(handler->conf, fd);
goto out_close;
}

Expand Down Expand Up @@ -1080,7 +1080,7 @@ static void lxc_cmd_fd_cleanup(int fd, struct lxc_handler *handler,
struct lxc_state_client *client;
struct lxc_list *cur, *next;

lxc_console_free(handler->conf, fd);
lxc_terminal_free(handler->conf, fd);
lxc_mainloop_del_handler(descr, fd);
if (cmd != LXC_CMD_ADD_STATE_CLIENT) {
close(fd);
Expand Down
2 changes: 1 addition & 1 deletion src/lxc/console.c
Expand Up @@ -617,7 +617,7 @@ int lxc_terminal_allocate(struct lxc_conf *conf, int sockfd, int *ttyreq)
return masterfd;
}

void lxc_console_free(struct lxc_conf *conf, int fd)
void lxc_terminal_free(struct lxc_conf *conf, int fd)
{
int i;
struct lxc_tty_info *tty_info = &conf->tty_info;
Expand Down
4 changes: 2 additions & 2 deletions src/lxc/console.h
Expand Up @@ -101,15 +101,15 @@ extern int lxc_console_create(struct lxc_conf *);
extern void lxc_console_delete(struct lxc_pty *);

/*
* lxc_console_free: mark the console or a tty as unallocated, free any
* lxc_terminal_free: mark the console or a tty as unallocated, free any
* resources allocated by lxc_terminal_allocate().
*
* @conf : the configuration of the container whose tty was closed
* @fd : the socket fd whose remote side was closed, which indicated
* the console or tty is no longer in use. this is used to match
* which console/tty is being freed.
*/
extern void lxc_console_free(struct lxc_conf *conf, int fd);
extern void lxc_terminal_free(struct lxc_conf *conf, int fd);

/*
* Register pty event handlers in an open mainloop
Expand Down

0 comments on commit 3dfe6f8

Please sign in to comment.