version 1.30, 2009/11/26 21:37:13 |
version 1.31, 2009/12/03 22:50:10 |
|
|
return; |
return; |
log_debug("writing %d to client %d", type, c->ibuf.fd); |
log_debug("writing %d to client %d", type, c->ibuf.fd); |
imsg_compose(ibuf, type, PROTOCOL_VERSION, -1, -1, (void *) buf, len); |
imsg_compose(ibuf, type, PROTOCOL_VERSION, -1, -1, (void *) buf, len); |
server_update_event(c); |
server_update_event(c); |
} |
} |
|
|
void |
void |
|
|
if (c == NULL || c->session == NULL || c->session != s) |
if (c == NULL || c->session == NULL || c->session != s) |
continue; |
continue; |
server_lock_client(c); |
server_lock_client(c); |
} |
} |
} |
} |
|
|
void |
void |
|
|
cmdlen = strlcpy(lockdata.cmd, cmd, sizeof lockdata.cmd); |
cmdlen = strlcpy(lockdata.cmd, cmd, sizeof lockdata.cmd); |
if (cmdlen >= sizeof lockdata.cmd) |
if (cmdlen >= sizeof lockdata.cmd) |
return; |
return; |
|
|
tty_stop_tty(&c->tty); |
tty_stop_tty(&c->tty); |
tty_raw(&c->tty, tty_term_string(c->tty.term, TTYC_SMCUP)); |
tty_raw(&c->tty, tty_term_string(c->tty.term, TTYC_SMCUP)); |
tty_raw(&c->tty, tty_term_string(c->tty.term, TTYC_CLEAR)); |
tty_raw(&c->tty, tty_term_string(c->tty.term, TTYC_CLEAR)); |
|
|
struct session *s; |
struct session *s; |
struct winlink *wl; |
struct winlink *wl; |
u_int i; |
u_int i; |
|
|
for (i = 0; i < ARRAY_LENGTH(&sessions); i++) { |
for (i = 0; i < ARRAY_LENGTH(&sessions); i++) { |
s = ARRAY_ITEM(&sessions, i); |
s = ARRAY_ITEM(&sessions, i); |
if (s == NULL || !session_has(s, w)) |
if (s == NULL || !session_has(s, w)) |
continue; |
continue; |
if ((wl = winlink_find_by_window(&s->windows, w)) == NULL) |
if ((wl = winlink_find_by_window(&s->windows, w)) == NULL) |
continue; |
continue; |
|
|
if (session_detach(s, wl)) |
if (session_detach(s, wl)) |
server_destroy_session_group(s); |
server_destroy_session_group(s); |
else { |
else { |
|
|
{ |
{ |
struct client *c; |
struct client *c; |
u_int i; |
u_int i; |
|
|
for (i = 0; i < ARRAY_LENGTH(&clients); i++) { |
for (i = 0; i < ARRAY_LENGTH(&clients); i++) { |
c = ARRAY_ITEM(&clients, i); |
c = ARRAY_ITEM(&clients, i); |
if (c == NULL || c->session != s) |
if (c == NULL || c->session != s) |
|
|
delay = options_get_number(&c->session->options, "display-panes-time"); |
delay = options_get_number(&c->session->options, "display-panes-time"); |
tv.tv_sec = delay / 1000; |
tv.tv_sec = delay / 1000; |
tv.tv_usec = (delay % 1000) * 1000L; |
tv.tv_usec = (delay % 1000) * 1000L; |
|
|
evtimer_del(&c->identify_timer); |
evtimer_del(&c->identify_timer); |
evtimer_set(&c->identify_timer, server_callback_identify, c); |
evtimer_set(&c->identify_timer, server_callback_identify, c); |
evtimer_add(&c->identify_timer, &tv); |
evtimer_add(&c->identify_timer, &tv); |
|
|
events |= EV_WRITE; |
events |= EV_WRITE; |
event_del(&c->event); |
event_del(&c->event); |
event_set(&c->event, c->ibuf.fd, events, server_client_callback, c); |
event_set(&c->event, c->ibuf.fd, events, server_client_callback, c); |
event_add(&c->event, NULL); |
event_add(&c->event, NULL); |
} |
} |