int term_width, term_height;
tree234 *channels; /* indexed by local id */
int term_width, term_height;
tree234 *channels; /* indexed by local id */
* freed by the caller.
*/
static const char *connect_to_host(Ssh ssh, char *host, int port,
* freed by the caller.
*/
static const char *connect_to_host(Ssh ssh, char *host, int port,
}
ssh->fn = &fn_table;
ssh->s = new_connection(addr, *realhost, port,
}
ssh->fn = &fn_table;
ssh->s = new_connection(addr, *realhost, port,
- 0, 1, nodelay, (Plug) ssh, &ssh->cfg);
+ 0, 1, nodelay, keepalive, (Plug) ssh, &ssh->cfg);
- int ospeed = 38400, ispeed = 38400; /* last-resort defaults */
- sscanf(ssh->cfg.termspeed, "%d,%d", &ospeed, &ispeed);
+ ssh->ospeed = 38400; ssh->ispeed = 38400; /* last-resort defaults */
+ sscanf(ssh->cfg.termspeed, "%d,%d", &ssh->ospeed, &ssh->ispeed);
/* Send the pty request. */
send_packet(ssh, SSH1_CMSG_REQUEST_PTY,
PKT_STR, ssh->cfg.termtype,
PKT_INT, ssh->term_height,
PKT_INT, ssh->term_width,
PKT_INT, 0, PKT_INT, 0, /* width,height in pixels */
/* Send the pty request. */
send_packet(ssh, SSH1_CMSG_REQUEST_PTY,
PKT_STR, ssh->cfg.termtype,
PKT_INT, ssh->term_height,
PKT_INT, ssh->term_width,
PKT_INT, 0, PKT_INT, 0, /* width,height in pixels */
- PKT_CHAR, 192, PKT_INT, ispeed, /* TTY_OP_ISPEED */
- PKT_CHAR, 193, PKT_INT, ospeed, /* TTY_OP_OSPEED */
+ PKT_CHAR, 192, PKT_INT, ssh->ispeed, /* TTY_OP_ISPEED */
+ PKT_CHAR, 193, PKT_INT, ssh->ospeed, /* TTY_OP_OSPEED */
ssh->editing = ssh->echoing = 1;
}
logeventf(ssh, "Allocated pty (ospeed %dbps, ispeed %dbps)",
ssh->editing = ssh->echoing = 1;
}
logeventf(ssh, "Allocated pty (ospeed %dbps, ispeed %dbps)",
- c_write_str(ssh, "Authenticating with public key \"");
- c_write_str(ssh, comment);
- c_write_str(ssh, "\"\r\n");
+ if (flags & FLAG_VERBOSE) {
+ c_write_str(ssh, "Authenticating with public key \"");
+ c_write_str(ssh, comment);
+ c_write_str(ssh, "\"\r\n");
+ }
- int ospeed = 38400, ispeed = 38400; /* last-resort defaults */
- sscanf(ssh->cfg.termspeed, "%d,%d", &ospeed, &ispeed);
+ ssh->ospeed = 38400; ssh->ispeed = 38400; /* last-resort defaults */
+ sscanf(ssh->cfg.termspeed, "%d,%d", &ssh->ospeed, &ssh->ispeed);
/* Build the pty request. */
ssh2_pkt_init(ssh, SSH2_MSG_CHANNEL_REQUEST);
ssh2_pkt_adduint32(ssh, ssh->mainchan->remoteid); /* recipient channel */
/* Build the pty request. */
ssh2_pkt_init(ssh, SSH2_MSG_CHANNEL_REQUEST);
ssh2_pkt_adduint32(ssh, ssh->mainchan->remoteid); /* recipient channel */
ssh2_pkt_adduint32(ssh, 0); /* pixel height */
ssh2_pkt_addstring_start(ssh);
ssh2_pkt_addbyte(ssh, 128); /* TTY_OP_ISPEED */
ssh2_pkt_adduint32(ssh, 0); /* pixel height */
ssh2_pkt_addstring_start(ssh);
ssh2_pkt_addbyte(ssh, 128); /* TTY_OP_ISPEED */
ssh2_pkt_addstring_data(ssh, "\0", 1); /* TTY_OP_END */
ssh2_pkt_send(ssh);
ssh->state = SSH_STATE_INTERMED;
ssh2_pkt_addstring_data(ssh, "\0", 1); /* TTY_OP_END */
ssh2_pkt_send(ssh);
ssh->state = SSH_STATE_INTERMED;
ssh->editing = ssh->echoing = 1;
} else {
logeventf(ssh, "Allocated pty (ospeed %dbps, ispeed %dbps)",
ssh->editing = ssh->echoing = 1;
} else {
logeventf(ssh, "Allocated pty (ospeed %dbps, ispeed %dbps)",
- char *host, int port, char **realhost, int nodelay)
+ char *host, int port, char **realhost, int nodelay,
+ int keepalive)
- p = connect_to_host(ssh, host, port, realhost, nodelay);
+ p = connect_to_host(ssh, host, port, realhost, nodelay, keepalive);