mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-06-30 19:12:48 -05:00
Pass an error message through to sshfwd_unclean_close.
We have access to one at every call site, so there's really no reason not to send it through to ssh.c to be logged. [originally from svn r10038]
This commit is contained in:
7
ssh.c
7
ssh.c
@ -4302,7 +4302,7 @@ void sshfwd_write_eof(struct ssh_channel *c)
|
||||
ssh_channel_try_eof(c);
|
||||
}
|
||||
|
||||
void sshfwd_unclean_close(struct ssh_channel *c)
|
||||
void sshfwd_unclean_close(struct ssh_channel *c, const char *err)
|
||||
{
|
||||
Ssh ssh = c->ssh;
|
||||
|
||||
@ -4312,12 +4312,13 @@ void sshfwd_unclean_close(struct ssh_channel *c)
|
||||
switch (c->type) {
|
||||
case CHAN_X11:
|
||||
x11_close(c->u.x11.s);
|
||||
logevent("Forwarded X11 connection terminated due to local error");
|
||||
logeventf(ssh, "Forwarded X11 connection terminated due to local "
|
||||
"error: %s", err);
|
||||
break;
|
||||
case CHAN_SOCKDATA:
|
||||
case CHAN_SOCKDATA_DORMANT:
|
||||
pfd_close(c->u.pfd.s);
|
||||
logevent("Forwarded port closed due to local error");
|
||||
logeventf(ssh, "Forwarded port closed due to local error: %s", err);
|
||||
break;
|
||||
}
|
||||
c->type = CHAN_ZOMBIE;
|
||||
|
Reference in New Issue
Block a user