version 1.36, 2000/09/21 11:25:33 |
version 1.37, 2000/09/26 19:59:58 |
|
|
if (ioctl(fileno(stdin), TIOCGWINSZ, &ws) < 0) |
if (ioctl(fileno(stdin), TIOCGWINSZ, &ws) < 0) |
return; |
return; |
|
|
debug("client_check_window_change: changed"); |
debug2("client_check_window_change: changed"); |
|
|
if (compat20) { |
if (compat20) { |
channel_request_start(session_ident, "window-change", 0); |
channel_request_start(session_ident, "window-change", 0); |
|
|
void |
void |
client_wait_until_can_do_something(fd_set * readset, fd_set * writeset) |
client_wait_until_can_do_something(fd_set * readset, fd_set * writeset) |
{ |
{ |
/*debug("client_wait_until_can_do_something"); */ |
|
|
|
/* Initialize select masks. */ |
/* Initialize select masks. */ |
FD_ZERO(readset); |
FD_ZERO(readset); |
FD_ZERO(writeset); |
FD_ZERO(writeset); |
|
|
if (FD_ISSET(connection_in, readset)) { |
if (FD_ISSET(connection_in, readset)) { |
/* Read as much as possible. */ |
/* Read as much as possible. */ |
len = read(connection_in, buf, sizeof(buf)); |
len = read(connection_in, buf, sizeof(buf)); |
/*debug("read connection_in len %d", len); XXX */ |
|
if (len == 0) { |
if (len == 0) { |
/* Received EOF. The remote host has closed the connection. */ |
/* Received EOF. The remote host has closed the connection. */ |
snprintf(buf, sizeof buf, "Connection to %.300s closed by remote host.\r\n", |
snprintf(buf, sizeof buf, "Connection to %.300s closed by remote host.\r\n", |
|
|
client_process_buffered_input_packets(); |
client_process_buffered_input_packets(); |
|
|
if (compat20 && !channel_still_open()) { |
if (compat20 && !channel_still_open()) { |
debug("!channel_still_open."); |
debug2("!channel_still_open."); |
break; |
break; |
} |
} |
|
|
|
|
int originator_port; |
int originator_port; |
originator = packet_get_string(NULL); |
originator = packet_get_string(NULL); |
if (datafellows & SSH_BUG_X11FWD) { |
if (datafellows & SSH_BUG_X11FWD) { |
debug("buggy server: x11 request w/o originator_port"); |
debug2("buggy server: x11 request w/o originator_port"); |
originator_port = 0; |
originator_port = 0; |
} else { |
} else { |
originator_port = packet_get_int(); |
originator_port = packet_get_int(); |
|
|
void |
void |
client_set_session_ident(int id) |
client_set_session_ident(int id) |
{ |
{ |
debug("client_set_session_ident: id %d", id); |
debug2("client_set_session_ident: id %d", id); |
session_ident = id; |
session_ident = id; |
channel_register_callback(id, SSH2_MSG_CHANNEL_REQUEST, |
channel_register_callback(id, SSH2_MSG_CHANNEL_REQUEST, |
client_input_channel_req, (void *)0); |
client_input_channel_req, (void *)0); |