View | Details | Raw Unified | Return to bug 2257 | Differences between
and this patch

Collapse All | Expand All

(-)packet.c (-2 / +12 lines)
Lines 1908-1916 sshpkt_fatal(struct ssh *ssh, const char Link Here
1908
		logit("Connection closed by %.200s", ssh_remote_ipaddr(ssh));
1908
		logit("Connection closed by %.200s", ssh_remote_ipaddr(ssh));
1909
		cleanup_exit(255);
1909
		cleanup_exit(255);
1910
	case SSH_ERR_CONN_TIMEOUT:
1910
	case SSH_ERR_CONN_TIMEOUT:
1911
		logit("Connection to %.200s timed out while "
1911
		logit("Connection to %.200s timed out", ssh_remote_ipaddr(ssh));
1912
		    "waiting to write", ssh_remote_ipaddr(ssh));
1913
		cleanup_exit(255);
1912
		cleanup_exit(255);
1913
	case SSH_ERR_DISCONNECTED:
1914
		logit("Disconnected from %.200s",
1915
		    ssh_remote_ipaddr(ssh));
1916
		cleanup_exit(255);
1917
	case SSH_ERR_SYSTEM_ERROR:
1918
		if (errno == ECONNRESET) {
1919
			logit("Connection reset by %.200s",
1920
			    ssh_remote_ipaddr(ssh));
1921
			cleanup_exit(255);
1922
		}
1923
		/* FALLTHROUGH */
1914
	default:
1924
	default:
1915
		fatal("%s%sConnection to %.200s: %s",
1925
		fatal("%s%sConnection to %.200s: %s",
1916
		    tag != NULL ? tag : "", tag != NULL ? ": " : "",
1926
		    tag != NULL ? tag : "", tag != NULL ? ": " : "",
(-)dispatch.c (-18 / +2 lines)
Lines 135-156 ssh_dispatch_run_fatal(struct ssh *ssh, Link Here
135
{
135
{
136
	int r;
136
	int r;
137
137
138
	if ((r = ssh_dispatch_run(ssh, mode, done, ctxt)) != 0) {
138
	if ((r = ssh_dispatch_run(ssh, mode, done, ctxt)) != 0)
139
		switch (r) {
139
		sshpkt_fatal(ssh, __func__, r);
140
		case SSH_ERR_CONN_CLOSED:
141
			logit("Connection closed by %.200s",
142
			    ssh_remote_ipaddr(ssh));
143
			cleanup_exit(255);
144
		case SSH_ERR_CONN_TIMEOUT:
145
			logit("Connection to %.200s timed out while "
146
			    "waiting to read", ssh_remote_ipaddr(ssh));
147
			cleanup_exit(255);
148
		case SSH_ERR_DISCONNECTED:
149
			logit("Disconnected from %.200s",
150
			    ssh_remote_ipaddr(ssh));
151
			cleanup_exit(255);
152
		default:
153
			fatal("%s: %s", __func__, ssh_err(r));
154
		}
155
	}
156
}
140
}

Return to bug 2257