ssh->portfwds = NULL;
}
+ /*
+ * Also stop attempting to connection-share.
+ */
+ if (ssh->connshare) {
+ sharestate_free(ssh->connshare);
+ ssh->connshare = NULL;
+ }
+
return ret;
}
s->dlgret = verify_ssh_manual_host_key(ssh, fingerprint, NULL, NULL);
if (s->dlgret == 0) { /* did not match */
bombout(("Host key did not appear in manually configured list"));
+ sfree(keystr);
crStop(0);
} else if (s->dlgret < 0) { /* none configured; use standard handling */
ssh_set_frozen(ssh, 1);
NULL, 0, TRUE);
crStop(0);
}
+ } else {
+ sfree(keystr);
}
}
ssh_special(ssh, TS_EOF);
if (ssh->ldisc)
- ldisc_send(ssh->ldisc, NULL, 0, 0);/* cause ldisc to notice changes */
+ ldisc_echoedit_update(ssh->ldisc); /* cause ldisc to notice changes */
ssh->send_ok = 1;
ssh->channels = newtree234(ssh_channelcmp);
while (1) {
* Transfer data!
*/
if (ssh->ldisc)
- ldisc_send(ssh->ldisc, NULL, 0, 0);/* cause ldisc to notice changes */
+ ldisc_echoedit_update(ssh->ldisc); /* cause ldisc to notice changes */
if (ssh->mainchan)
ssh->send_ok = 1;
while (1) {
ssh->sent_console_eof = FALSE;
ssh->got_pty = FALSE;
ssh->bare_connection = FALSE;
+ ssh->X11_fwd_enabled = FALSE;
+ ssh->connshare = NULL;
ssh->attempting_connshare = FALSE;
*backend_handle = ssh;
}
/*
- * cfg_info for SSH is the currently running version of the
- * protocol. (1 for 1; 2 for 2; 0 for not-decided-yet.)
+ * cfg_info for SSH is the protocol running in this session.
+ * (1 or 2 for the full SSH-1 or SSH-2 protocol; -1 for the bare
+ * SSH-2 connection protocol, i.e. a downstream; 0 for not-decided-yet.)
*/
static int ssh_cfg_info(void *handle)
{
Ssh ssh = (Ssh) handle;
- return ssh->version;
+ if (ssh->version == 0)
+ return 0; /* don't know yet */
+ else if (ssh->bare_connection)
+ return -1;
+ else
+ return ssh->version;
}
/*