aboutsummaryrefslogtreecommitdiff
path: root/ares
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2006-08-29 15:17:47 +0000
committerDaniel Stenberg <daniel@haxx.se>2006-08-29 15:17:47 +0000
commit7c621cfbdf03ce0d2a266407fb49fc8ccfdf250f (patch)
treeb9235d62a58ce8a6950bf2a81d1db6b25c7bb398 /ares
parent5acadc9cd7a1ff40ffa8d57214c90d8c788b2b03 (diff)
Brad Spencer did
o made ares_version.h use extern "C" for c++ compilers o fixed compiler warnings in ares_getnameinfo.c o fixed a buffer position init for TCP reads
Diffstat (limited to 'ares')
-rw-r--r--ares/CHANGES8
-rw-r--r--ares/ares_getnameinfo.c4
-rw-r--r--ares/ares_process.c1
-rw-r--r--ares/ares_version.h8
4 files changed, 19 insertions, 2 deletions
diff --git a/ares/CHANGES b/ares/CHANGES
index 801d41bd8..0a927c284 100644
--- a/ares/CHANGES
+++ b/ares/CHANGES
@@ -1,5 +1,13 @@
Changelog for the c-ares project
+* August 29 2006
+
+- Brad Spencer did
+
+ o made ares_version.h use extern "C" for c++ compilers
+ o fixed compiler warnings in ares_getnameinfo.c
+ o fixed a buffer position init for TCP reads
+
* August 3 2006
- Ravi Pratap fixed ares_getsock() to actually return the proper bitmap and
diff --git a/ares/ares_getnameinfo.c b/ares/ares_getnameinfo.c
index d13b11d47..0b12f38ba 100644
--- a/ares/ares_getnameinfo.c
+++ b/ares/ares_getnameinfo.c
@@ -81,8 +81,8 @@ static char *ares_striendstr(const char *s1, const char *s2);
void ares_getnameinfo(ares_channel channel, const struct sockaddr *sa, socklen_t salen,
int flags, ares_nameinfo_callback callback, void *arg)
{
- struct sockaddr_in *addr = NULL;
- struct sockaddr_in6 *addr6 = NULL;
+ struct sockaddr_in *addr;
+ struct sockaddr_in6 *addr6;
struct nameinfo_query *niquery;
/* Verify the buffer size */
diff --git a/ares/ares_process.c b/ares/ares_process.c
index 5f5f8d852..fb98e70b9 100644
--- a/ares/ares_process.c
+++ b/ares/ares_process.c
@@ -297,6 +297,7 @@ static void read_tcp_data(ares_channel channel, fd_set *read_fds, time_t now)
free(server->tcp_buffer);
server->tcp_buffer = NULL;
server->tcp_lenbuf_pos = 0;
+ server->tcp_buffer_pos = 0;
}
}
}
diff --git a/ares/ares_version.h b/ares/ares_version.h
index 976540191..cf4491f68 100644
--- a/ares/ares_version.h
+++ b/ares/ares_version.h
@@ -11,7 +11,15 @@
(ARES_VERSION_PATCH))
#define ARES_VERSION_STR "1.3.1"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
const char *ares_version(int *version);
+#ifdef __cplusplus
+}
+#endif
+
#endif