projects
/
u
/
mdw
/
putty
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
80ffa58
)
ssh_do_close() should close any listening sockets associated with
author
jacob
<jacob@cda61777-01e9-0310-a592-d414129be87e>
Thu, 17 Feb 2005 02:00:01 +0000
(
02:00
+0000)
committer
jacob
<jacob@cda61777-01e9-0310-a592-d414129be87e>
Thu, 17 Feb 2005 02:00:01 +0000
(
02:00
+0000)
port-forwardings.
git-svn-id: svn://svn.tartarus.org/sgt/putty@5325
cda61777
-01e9-0310-a592-
d414129be87e
ssh.c
patch
|
blob
|
blame
|
history
diff --git
a/ssh.c
b/ssh.c
index
825731e
..
e2e8077
100644
(file)
--- a/
ssh.c
+++ b/
ssh.c
@@
-2409,6
+2409,20
@@
static int ssh_do_close(Ssh ssh, int notify_exit)
sfree(c);
}
}
sfree(c);
}
}
+ /*
+ * Go through port-forwardings, and close any associated
+ * listening sockets.
+ */
+ if (ssh->portfwds) {
+ struct ssh_portfwd *pf;
+ while (NULL != (pf = index234(ssh->portfwds, 0))) {
+ /* Dispose of any listening socket. */
+ if (pf->local)
+ pfd_terminate(pf->local);
+ del234(ssh->portfwds, pf); /* moving next one to index 0 */
+ free_portfwd(pf);
+ }
+ }
return ret;
}
return ret;
}