* with at any time.
*/
handler_fn_t packet_dispatch[256];
+
+ /*
+ * This module deals with sending keepalives.
+ */
+ Pinger pinger;
};
#define logevent(s) logevent(ssh->frontend, s)
}
update_specials_menu(ssh->frontend);
ssh->state = SSH_STATE_BEFORE_SIZE;
+ ssh->pinger = pinger_new(&ssh->cfg, &ssh_backend, ssh);
sfree(s->vstring);
if (ssh->s) {
sk_close(ssh->s);
ssh->s = NULL;
+ notify_remote_exit(ssh->frontend);
}
/*
* Now we must shut down any port and X forwardings going
0, 1, nodelay, keepalive, (Plug) ssh, &ssh->cfg);
if ((err = sk_socket_error(ssh->s)) != NULL) {
ssh->s = NULL;
+ notify_remote_exit(ssh->frontend);
return err;
}
ssh->protocol_initial_phase_done = FALSE;
+ ssh->pinger = NULL;
+
p = connect_to_host(ssh, host, port, realhost, nodelay, keepalive);
if (p != NULL)
return p;
if (ssh->s)
ssh_do_close(ssh);
sfree(ssh);
+ if (ssh->pinger)
+ pinger_free(ssh->pinger);
}
/*
static void ssh_reconfig(void *handle, Config *cfg)
{
Ssh ssh = (Ssh) handle;
+ pinger_reconfig(ssh->pinger, &ssh->cfg, cfg);
ssh->cfg = *cfg; /* STRUCTURE COPY */
}