~mdw
/
sgt
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Mention PUTTY.RND by name
[sgt/putty]
/
windows
/
winnet.c
diff --git
a/windows/winnet.c
b/windows/winnet.c
index
f6f7bab
..
8a7580b
100644
(file)
--- a/
windows/winnet.c
+++ b/
windows/winnet.c
@@
-251,8
+251,10
@@
void sk_cleanup(void)
p_WSACleanup();
if (winsock_module)
FreeLibrary(winsock_module);
p_WSACleanup();
if (winsock_module)
FreeLibrary(winsock_module);
+#ifndef NO_IPV6
if (wship6_module)
FreeLibrary(wship6_module);
if (wship6_module)
FreeLibrary(wship6_module);
+#endif
}
char *winsock_error_string(int error)
}
char *winsock_error_string(int error)
@@
-351,6
+353,9
@@
SockAddr sk_namelookup(const char *host, char **canonicalname,
address_family == ADDRTYPE_IPV6 ? AF_INET6 :
#endif
AF_UNSPEC);
address_family == ADDRTYPE_IPV6 ? AF_INET6 :
#endif
AF_UNSPEC);
+#ifndef NO_IPV6
+ ret->ai = ret->ais = NULL;
+#endif
ret_family = AF_UNSPEC;
*realhost = '\0';
ret_family = AF_UNSPEC;
*realhost = '\0';
@@
-454,6
+459,10
@@
SockAddr sk_nonamelookup(const char *host)
SockAddr ret = snew(struct SockAddr_tag);
ret->error = NULL;
ret->family = AF_UNSPEC;
SockAddr ret = snew(struct SockAddr_tag);
ret->error = NULL;
ret->family = AF_UNSPEC;
+#ifndef NO_IPV6
+ ret->ai = ret->ais = NULL;
+#endif
+ ret->naddresses = 0;
strncpy(ret->hostname, host, lenof(ret->hostname));
ret->hostname[lenof(ret->hostname)-1] = '\0';
return ret;
strncpy(ret->hostname, host, lenof(ret->hostname));
ret->hostname[lenof(ret->hostname)-1] = '\0';
return ret;
@@
-1507,9
+1516,12
@@
static void sk_tcp_set_frozen(Socket sock, int is_frozen)
if (s->frozen == is_frozen)
return;
s->frozen = is_frozen;
if (s->frozen == is_frozen)
return;
s->frozen = is_frozen;
- if (!is_frozen && s->frozen_readable) {
- char c;
- p_recv(s->s, &c, 1, MSG_PEEK);
+ if (!is_frozen) {
+ do_select(s->s, 1);
+ if (s->frozen_readable) {
+ char c;
+ p_recv(s->s, &c, 1, MSG_PEEK);
+ }
}
s->frozen_readable = 0;
}
}
s->frozen_readable = 0;
}