version 1.231, 2017/05/10 10:46:59 |
version 1.232, 2017/05/16 12:57:26 |
|
|
|
|
/* Identify mode callback. */ |
/* Identify mode callback. */ |
static void |
static void |
server_client_callback_identify(__unused int fd, __unused short events, void *data) |
server_client_callback_identify(__unused int fd, __unused short events, |
|
void *data) |
{ |
{ |
server_client_clear_identify(data, NULL); |
server_client_clear_identify(data, NULL); |
} |
} |
|
|
void |
void |
server_client_suspend(struct client *c) |
server_client_suspend(struct client *c) |
{ |
{ |
struct session *s = c->session; |
struct session *s = c->session; |
|
|
if (s == NULL || (c->flags & CLIENT_DETACHING)) |
if (s == NULL || (c->flags & CLIENT_DETACHING)) |
return; |
return; |
|
|
void |
void |
server_client_detach(struct client *c, enum msgtype msgtype) |
server_client_detach(struct client *c, enum msgtype msgtype) |
{ |
{ |
struct session *s = c->session; |
struct session *s = c->session; |
|
|
if (s == NULL || (c->flags & CLIENT_DETACHING)) |
if (s == NULL || (c->flags & CLIENT_DETACHING)) |
return; |
return; |
|
|
struct session *s = c->session; |
struct session *s = c->session; |
struct tty *tty = &c->tty; |
struct tty *tty = &c->tty; |
struct window_pane *wp; |
struct window_pane *wp; |
int needed, flags, masked; |
int needed, flags, masked; |
struct timeval tv = { .tv_usec = 1000 }; |
struct timeval tv = { .tv_usec = 1000 }; |
static struct event ev; |
static struct event ev; |
size_t left; |
size_t left; |
|
|
server_client_dispatch_identify(struct client *c, struct imsg *imsg) |
server_client_dispatch_identify(struct client *c, struct imsg *imsg) |
{ |
{ |
const char *data, *home; |
const char *data, *home; |
size_t datalen; |
size_t datalen; |
int flags; |
int flags; |
char *name; |
char *name; |
|
|
|
|
server_client_push_stdout(struct client *c) |
server_client_push_stdout(struct client *c) |
{ |
{ |
struct msg_stdout_data data; |
struct msg_stdout_data data; |
size_t sent, left; |
size_t sent, left; |
|
|
left = EVBUFFER_LENGTH(c->stdout_data); |
left = EVBUFFER_LENGTH(c->stdout_data); |
while (left != 0) { |
while (left != 0) { |
|
|
server_client_push_stderr(struct client *c) |
server_client_push_stderr(struct client *c) |
{ |
{ |
struct msg_stderr_data data; |
struct msg_stderr_data data; |
size_t sent, left; |
size_t sent, left; |
|
|
if (c->stderr_data == c->stdout_data) { |
if (c->stderr_data == c->stdout_data) { |
server_client_push_stdout(c); |
server_client_push_stdout(c); |