console: lxc_terminal_free()

parent c1ee47cd
...@@ -757,7 +757,7 @@ static int lxc_cmd_console_callback(int fd, struct lxc_cmd_req *req, ...@@ -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)); ret = lxc_abstract_unix_send_fds(fd, &masterfd, 1, &rsp, sizeof(rsp));
if (ret < 0) { if (ret < 0) {
ERROR("Failed to send tty to client"); ERROR("Failed to send tty to client");
lxc_console_free(handler->conf, fd); lxc_terminal_free(handler->conf, fd);
goto out_close; goto out_close;
} }
...@@ -1080,7 +1080,7 @@ static void lxc_cmd_fd_cleanup(int fd, struct lxc_handler *handler, ...@@ -1080,7 +1080,7 @@ static void lxc_cmd_fd_cleanup(int fd, struct lxc_handler *handler,
struct lxc_state_client *client; struct lxc_state_client *client;
struct lxc_list *cur, *next; struct lxc_list *cur, *next;
lxc_console_free(handler->conf, fd); lxc_terminal_free(handler->conf, fd);
lxc_mainloop_del_handler(descr, fd); lxc_mainloop_del_handler(descr, fd);
if (cmd != LXC_CMD_ADD_STATE_CLIENT) { if (cmd != LXC_CMD_ADD_STATE_CLIENT) {
close(fd); close(fd);
......
...@@ -617,7 +617,7 @@ out: ...@@ -617,7 +617,7 @@ out:
return masterfd; return masterfd;
} }
void lxc_console_free(struct lxc_conf *conf, int fd) void lxc_terminal_free(struct lxc_conf *conf, int fd)
{ {
int i; int i;
struct lxc_tty_info *tty_info = &conf->tty_info; struct lxc_tty_info *tty_info = &conf->tty_info;
......
...@@ -101,7 +101,7 @@ extern int lxc_console_create(struct lxc_conf *); ...@@ -101,7 +101,7 @@ extern int lxc_console_create(struct lxc_conf *);
extern void lxc_console_delete(struct lxc_pty *); 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(). * resources allocated by lxc_terminal_allocate().
* *
* @conf : the configuration of the container whose tty was closed * @conf : the configuration of the container whose tty was closed
...@@ -109,7 +109,7 @@ extern void lxc_console_delete(struct lxc_pty *); ...@@ -109,7 +109,7 @@ extern void lxc_console_delete(struct lxc_pty *);
* the console or tty is no longer in use. this is used to match * the console or tty is no longer in use. this is used to match
* which console/tty is being freed. * 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 * Register pty event handlers in an open mainloop
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment