Differences From Artifact [a2ddb2041c]:
- File ssh.c — part of check-in [16f350f6b0] at 2009-08-18 18:38:48 on branch trunk — Fix handling of duplicate port forwardings; they were effectively cancelling out, but are now just ignored. (We should make more effort to prevent duplicates before they get as far as ssh_setup_portfwd() -- it's currently trivially easy to enter them in the GUI and on the command line, let alone both -- but there's bound to be someone with a saved session containing dupes out there by now, and anyway there are duplicates we can't detect before getting this far, for instance "1234:localhost:22" vs "1234:localhost:ssh".) (user: jacob size: 291503)
To Artifact [d022724cb4]:
- File ssh.c — part of check-in [fecf1a52c9] at 2010-01-17 10:20:45 on branch trunk — Plug a few minor memory leaks, based on a patch by Sirp Potijk. While I'm here, add an assertion in sshrand.c to catch mistakes in reference counting. (user: jacob size: 291555)
| ︙ | |||
2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 | 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 | + + |
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);
}
freetree234(ssh->portfwds);
ssh->portfwds = NULL;
}
return ret;
}
static void ssh_log(Plug plug, int type, SockAddr addr, int port,
const char *error_msg, int error_code)
|
| ︙ |