aboutsummaryrefslogtreecommitdiff
path: root/ares/setup.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-07-24 21:47:49 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-07-24 21:47:49 +0000
commitb3b2ba31f7f666f31e187db9c223062553966566 (patch)
tree6acdfb45246bcf76087412ae8cbdd4cf31dd3e17 /ares/setup.h
parent7f78bc3c6d167760a41a5183d21b3ecfe2718a7c (diff)
Gisle Vanem:
Basically in loops like handle_errors(), 'query->next' was assigned a local variable and then query was referenced after the memory was freed by next_server(). I've changed that so next_server() and end_query() returns the next query. So callers should use this ret-value. The next problem was that 'server->tcp_buffer_pos' had a random value at entry to 1st recv() (luckily causing Winsock to return ENOBUFS). I've also added a ares_writev() for Windows to streamline the code a bit more.
Diffstat (limited to 'ares/setup.h')
-rw-r--r--ares/setup.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/ares/setup.h b/ares/setup.h
index eca1c90bb..a713ef9cb 100644
--- a/ares/setup.h
+++ b/ares/setup.h
@@ -34,6 +34,7 @@
/* now typedef our socket type */
#ifdef WIN32
+#include <winsock.h>
typedef SOCKET ares_socket_t;
#define ARES_SOCKET_BAD INVALID_SOCKET
#else