X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/2184a5d91ffbcf2de2f730c83dda2d9443035f50..514702987c9252fcb0ab98882a6603b3bd0505ce:/portfwd.c diff --git a/portfwd.c b/portfwd.c index 732bfc5b..e65dd31a 100644 --- a/portfwd.c +++ b/portfwd.c @@ -138,7 +138,7 @@ char *pfd_newconnect(Socket *s, char *hostname, int port, void *c) pr->ready = 1; pr->c = c; - pr->s = *s = sk_new(addr, port, 0, 1, 0, (Plug) pr); + pr->s = *s = new_connection(addr, dummy_realhost, port, 0, 1, 0, (Plug) pr); if ((err = sk_socket_error(*s))) { sfree(pr); return err; @@ -177,7 +177,7 @@ static int pfd_accepting(Plug p, void *sock) return err != NULL; } - pr->c = new_sock_channel(s); + pr->c = new_sock_channel(backhandle, s); strcpy(pr->hostname, org->hostname); pr->port = org->port; @@ -192,7 +192,8 @@ static int pfd_accepting(Plug p, void *sock) return 1; } else { /* asks to forward to the specified host/port for this */ - ssh_send_port_open(pr->c, pr->hostname, pr->port, "forwarding"); + ssh_send_port_open(backhandle, pr->c, pr->hostname, + pr->port, "forwarding"); } return 0; @@ -227,7 +228,7 @@ char *pfd_addforward(char *desthost, int destport, int port) pr->ready = 0; pr->waiting = NULL; - pr->s = s = sk_newlistener(port, (Plug) pr, !cfg.lport_acceptall); + pr->s = s = new_listener(port, (Plug) pr, !cfg.lport_acceptall); if ((err = sk_socket_error(s))) { sfree(pr); return err;