~mdw
/
sgt
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use the shiny new character-set library to handle conversion from Unicode
[sgt/putty]
/
portfwd.c
diff --git
a/portfwd.c
b/portfwd.c
index
a153d08
..
dc865f6
100644
(file)
--- a/
portfwd.c
+++ b/
portfwd.c
@@
-1,4
+1,3
@@
-#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
@@
-127,7
+126,7
@@
char *pfd_newconnect(Socket *s, char *hostname, int port, void *c)
/*
* Try to find host.
*/
/*
* Try to find host.
*/
- addr =
sk_namelookup(hostname
, &dummy_realhost);
+ addr =
name_lookup(hostname, port
, &dummy_realhost);
if ((err = sk_addr_error(addr)))
return err;
if ((err = sk_addr_error(addr)))
return err;
@@
-204,9
+203,10
@@
static int pfd_accepting(Plug p, void *sock)
/* Add a new forwarding from port -> desthost:destport
/* Add a new forwarding from port -> desthost:destport
- sets up a listener on the local machine on port
+ sets up a listener on the local machine on
(srcaddr:)
port
*/
*/
-char *pfd_addforward(char *desthost, int destport, int port, void *backhandle)
+char *pfd_addforward(char *desthost, int destport, char *srcaddr, int port,
+ void *backhandle)
{
static struct plug_function_table fn_table = {
pfd_closing,
{
static struct plug_function_table fn_table = {
pfd_closing,
@@
-232,7
+232,7
@@
char *pfd_addforward(char *desthost, int destport, int port, void *backhandle)
pr->waiting = NULL;
pr->backhandle = backhandle;
pr->waiting = NULL;
pr->backhandle = backhandle;
- pr->s = s = new_listener(port, (Plug) pr, !cfg.lport_acceptall);
+ pr->s = s = new_listener(
srcaddr,
port, (Plug) pr, !cfg.lport_acceptall);
if ((err = sk_socket_error(s))) {
sfree(pr);
return err;
if ((err = sk_socket_error(s))) {
sfree(pr);
return err;