summaryrefslogtreecommitdiff
path: root/nameser.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
commite8e8d3a4077add2afb6dec9400178921efd9db6f (patch)
tree935200a887984a4580f7cd0cf5c2d85422833b04 /nameser.h
parent58f74b0549f33791b2d3e773472f5c8b2e69efea (diff)
downloadc-ares-e8e8d3a4077add2afb6dec9400178921efd9db6f.tar.gz
c-ares-e8e8d3a4077add2afb6dec9400178921efd9db6f.tar.bz2
c-ares-e8e8d3a4077add2afb6dec9400178921efd9db6f.zip
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 'nameser.h')
-rw-r--r--nameser.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/nameser.h b/nameser.h
index 77c76bf..d3a95e8 100644
--- a/nameser.h
+++ b/nameser.h
@@ -26,6 +26,9 @@ struct iovec
#define getpid() _getpid()
+int ares_writev (SOCKET s, const struct iovec *vector, size_t count);
+#define writev(s,vect,count) ares_writev(s,vect,count)
+
struct timezone { int dummy; };
int ares_gettimeofday(struct timeval *tv, struct timezone *tz);