projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Jacob's patch to make passphrase boxes work more sanely
[u/mdw/putty]
/
winnet.c
diff --git
a/winnet.c
b/winnet.c
index
777c8c3
..
7d92791
100644
(file)
--- a/
winnet.c
+++ b/
winnet.c
@@
-287,10
+287,10
@@
SockAddr sk_namelookup(char *host, char **canonicalname)
}
else
{
}
else
{
-
/*
- * Hack inserted to deal with problems with numeric IPs.
- * FIXME: how will this work in IPv6?
-
*/
+ /*
+ * This must be a numeric IPv4 address because it caused a
+ * success return from inet_addr.
+ */
ret->family = AF_INET;
*canonicalname = host;
}
ret->family = AF_INET;
*canonicalname = host;
}
@@
-747,11
+747,13
@@
static char *sk_tcp_socket_error(Socket sock) {
/*
* For Plink: enumerate all sockets currently active.
*/
/*
* For Plink: enumerate all sockets currently active.
*/
-SOCKET first_socket(enum234 *e) {
- Actual_Socket s = first234(sktree, e);
+SOCKET first_socket(int *state) {
+ Actual_Socket s;
+ *state = 0;
+ s = index234(sktree, (*state)++);
return s ? s->s : INVALID_SOCKET;
}
return s ? s->s : INVALID_SOCKET;
}
-SOCKET next_socket(
enum234 *
e) {
- Actual_Socket s =
next234(e
);
+SOCKET next_socket(
int *stat
e) {
+ Actual_Socket s =
index234(sktree, (*state)++
);
return s ? s->s : INVALID_SOCKET;
}
return s ? s->s : INVALID_SOCKET;
}