This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Upgrade C-Ares to 1.7.3

  • Loading branch information...
1 parent d127d15 commit 9c85357846fddebcd755df90ec37b8aa37c0a535 @ry ry committed Jun 11, 2010
Showing with 495 additions and 119 deletions.
  1. +24 −1 deps/c-ares/CHANGES
  2. +1 −1 deps/c-ares/README
  3. +0 −1 deps/c-ares/README.msvc
  4. +1 −1 deps/c-ares/README.node
  5. +4 −10 deps/c-ares/RELEASE-NOTES
  6. +0 −1 deps/c-ares/ares.h
  7. +0 −1 deps/c-ares/ares__close_sockets.c
  8. +0 −1 deps/c-ares/ares__get_hostent.c
  9. +0 −1 deps/c-ares/ares__read_line.c
  10. +0 −1 deps/c-ares/ares__timeval.c
  11. +0 −1 deps/c-ares/ares_cancel.c
  12. +0 −1 deps/c-ares/ares_data.c
  13. +0 −1 deps/c-ares/ares_data.h
  14. +0 −1 deps/c-ares/ares_destroy.c
  15. +0 −1 deps/c-ares/ares_dns.h
  16. +0 −1 deps/c-ares/ares_expand_name.c
  17. +0 −1 deps/c-ares/ares_expand_string.c
  18. +0 −1 deps/c-ares/ares_fds.c
  19. +0 −1 deps/c-ares/ares_free_hostent.c
  20. +0 −1 deps/c-ares/ares_free_string.c
  21. +6 −5 deps/c-ares/ares_gethostbyaddr.c
  22. +19 −17 deps/c-ares/ares_gethostbyname.c
  23. +22 −13 deps/c-ares/ares_getnameinfo.c
  24. +0 −1 deps/c-ares/ares_getopt.c
  25. +0 −1 deps/c-ares/ares_getsock.c
  26. +12 −3 deps/c-ares/ares_init.c
  27. +0 −1 deps/c-ares/ares_ipv6.h
  28. +0 −1 deps/c-ares/ares_library_init.c
  29. +0 −1 deps/c-ares/ares_library_init.h
  30. +0 −1 deps/c-ares/ares_llist.c
  31. +0 −1 deps/c-ares/ares_llist.h
  32. +0 −1 deps/c-ares/ares_mkquery.c
  33. +0 −1 deps/c-ares/ares_nowarn.c
  34. +0 −1 deps/c-ares/ares_nowarn.h
  35. +0 −1 deps/c-ares/ares_options.c
  36. +0 −1 deps/c-ares/ares_parse_a_reply.c
  37. +0 −1 deps/c-ares/ares_parse_aaaa_reply.c
  38. +0 −1 deps/c-ares/ares_parse_ptr_reply.c
  39. +0 −1 deps/c-ares/ares_parse_srv_reply.c
  40. +0 −1 deps/c-ares/ares_parse_txt_reply.c
  41. +0 −1 deps/c-ares/ares_private.h
  42. +1 −2 deps/c-ares/ares_process.c
  43. +0 −1 deps/c-ares/ares_query.c
  44. +0 −1 deps/c-ares/ares_rules.h
  45. +0 −1 deps/c-ares/ares_search.c
  46. +0 −1 deps/c-ares/ares_send.c
  47. +0 −1 deps/c-ares/ares_strcasecmp.c
  48. +0 −1 deps/c-ares/ares_strcasecmp.h
  49. +0 −1 deps/c-ares/ares_strdup.c
  50. +0 −1 deps/c-ares/ares_strdup.h
  51. +0 −1 deps/c-ares/ares_strerror.c
  52. +0 −1 deps/c-ares/ares_timeout.c
  53. +0 −1 deps/c-ares/ares_version.c
  54. +2 −3 deps/c-ares/ares_version.h
  55. +0 −1 deps/c-ares/ares_writev.c
  56. +0 −1 deps/c-ares/ares_writev.h
  57. +0 −1 deps/c-ares/bitncmp.c
  58. +0 −1 deps/c-ares/bitncmp.h
  59. +353 −0 deps/c-ares/config-win32.h
  60. +0 −1 deps/c-ares/get_ver.awk
  61. +0 −1 deps/c-ares/inet_net_pton.c
  62. +0 −1 deps/c-ares/inet_net_pton.h
  63. +0 −1 deps/c-ares/inet_ntop.c
  64. +0 −1 deps/c-ares/inet_ntop.h
  65. +0 −1 deps/c-ares/nameser.h
  66. +50 −8 deps/c-ares/setup_once.h
  67. +0 −1 deps/c-ares/windows_port.c
View
@@ -1,7 +1,30 @@
Changelog for the c-ares project
+Version 1.7.3 (June 11, 2010)
+
+Fixed:
+
+ o builds on Android
+ o now includes all files necessary to build it (1.7.2 lacked a file)
+
+Version 1.7.2 (June 10, 2010)
+
+Changed:
+
+ o Added ares_parse_mx_reply()
+
+Fixed:
+
+ o ares_init: Last, not first instance of domain or search should win
+ o improve alternative definition of bool
+ o fix VS2010 compiler warnings
+
+
Version 1.7.1 (Mar 23, 2010)
+* May 31, 2010 (Jakub Hrozek)
+- Use the last instance of domain/search, not the first one
+
* March 23, 2010 (Daniel Stenberg)
- We switched from CVS to git. See http://github.com/bagder/c-ares
@@ -27,7 +50,7 @@ Version 1.7.1 (Mar 23, 2010)
functions do not support IPv6 name servers. This implies that if the user
is capable of defining or providing an IPv6 name server, and the app is
using ares_init_options() or ares_save_options() at some point to handle
- the name servers, the app will likely loose IPv6 name servers.
+ the name servers, the app will likely lose IPv6 name servers.
* January 28, 2010 (Daniel Stenberg)
- Tommie Gannert pointed out a silly bug in ares_process_fd() since it didn't
View
@@ -44,7 +44,7 @@ The following notes apply to c-ares version 1.7.0 and later.
* If you intend to distribute an already compiled c-ares library you _MUST_
also distribute along with it the generated ares_build.h which has been
used to compile it. Otherwise the library will be of no use for the users of
- the library that you have built. It is _your_ responsability to provide this
+ the library that you have built. It is _your_ responsibility to provide this
file. No one at the c-ares project can know how you have built the library.
* File ares_build.h includes platform and configuration dependent info,
View
@@ -1,4 +1,3 @@
- $Id$
___ __ _ _ __ ___ ___
View
@@ -1,6 +1,6 @@
Library: c-ares, DNS resolver
-Version: 1.7.1 (23 march, 2010)
+Version: 1.7.3 (11 June, 2010)
Authors: Greg Hudson, Daniel Stenberg
View
@@ -1,18 +1,12 @@
-This is what's new and changed in the c-ares 1.7.1 release:
-
-Changed:
-
- o added IPv6 name servers support
+c-ares version 1.7.3
Fixed:
- o closing of sockets on Windows systems
- o MSVC deprecated compiler options warnings
- o ares_process_fd() didn't check broken connections
+ o builds on Android
+ o now includes all files necessary to build it (1.7.2 lacked a file)
Thanks go to these friendly people for their efforts and contributions:
- Ingmar Runge, Laszlo Tamas Szabo, Yang Tse, Tommie Gannert, Gregor Jasny,
- Phil Blundell, Cedric Bail, Jakub Hrozek
+ Yang Tse, Bogdan Vatra
Have fun!
View
@@ -1,4 +1,3 @@
-/* $Id$ */
/* Copyright 1998, 2009 by the Massachusetts Institute of Technology.
* Copyright (C) 2007-2010 by Daniel Stenberg
@@ -1,4 +1,3 @@
-/* $Id$ */
/* Copyright 1998 by the Massachusetts Institute of Technology.
*
@@ -1,4 +1,3 @@
-/* $Id$ */
/* Copyright 1998, 2010 by the Massachusetts Institute of Technology.
*
@@ -1,4 +1,3 @@
-/* $Id$ */
/* Copyright 1998 by the Massachusetts Institute of Technology.
*
@@ -1,4 +1,3 @@
-/* $Id$ */
/* Copyright (C) 2008 by Daniel Stenberg et al
*
@@ -1,4 +1,3 @@
-/* $Id$ */
/* Copyright (C) 2004 by Daniel Stenberg et al
*
View
@@ -1,4 +1,3 @@
-/* $Id$ */
/* Copyright (C) 2009-2010 by Daniel Stenberg
*
View
@@ -1,4 +1,3 @@
-/* $Id$ */
/* Copyright (C) 2009-2010 by Daniel Stenberg
*
@@ -1,4 +1,3 @@
-/* $Id$ */
/* Copyright 1998 by the Massachusetts Institute of Technology.
* Copyright (C) 2004-2010 by Daniel Stenberg
View
@@ -1,4 +1,3 @@
-/* $Id$ */
/* Copyright 1998 by the Massachusetts Institute of Technology.
*
@@ -1,4 +1,3 @@
-/* $Id$ */
/* Copyright 1998 by the Massachusetts Institute of Technology.
*
@@ -1,4 +1,3 @@
-/* $Id$ */
/* Copyright 1998 by the Massachusetts Institute of Technology.
*
View
@@ -1,4 +1,3 @@
-/* $Id$ */
/* Copyright 1998 by the Massachusetts Institute of Technology.
*
@@ -1,4 +1,3 @@
-/* $Id$ */
/* Copyright 1998 by the Massachusetts Institute of Technology.
*
@@ -1,4 +1,3 @@
-/* $Id$ */
/* Copyright 2000 by the Massachusetts Institute of Technology.
*
@@ -1,4 +1,3 @@
-/* $Id$ */
/* Copyright 1998 by the Massachusetts Institute of Technology.
*
@@ -191,8 +190,8 @@ static int file_lookup(struct ares_addr *addr, struct hostent **host)
char tmp[MAX_PATH];
HKEY hkeyHosts;
- if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, WIN_NS_NT_KEY, 0, KEY_READ, &hkeyHosts)
- == ERROR_SUCCESS)
+ if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, WIN_NS_NT_KEY, 0, KEY_READ,
+ &hkeyHosts) == ERROR_SUCCESS)
{
DWORD dwLength = MAX_PATH;
RegQueryValueEx(hkeyHosts, DATABASEPATH, NULL, NULL, (LPBYTE)tmp,
@@ -241,12 +240,14 @@ static int file_lookup(struct ares_addr *addr, struct hostent **host)
}
if (addr->family == AF_INET)
{
- if (memcmp((*host)->h_addr, &addr->addrV4, sizeof(addr->addrV4)) == 0)
+ if (memcmp((*host)->h_addr, &addr->addrV4,
+ sizeof(addr->addrV4)) == 0)
break;
}
else if (addr->family == AF_INET6)
{
- if (memcmp((*host)->h_addr, &addr->addrV6, sizeof(addr->addrV6)) == 0)
+ if (memcmp((*host)->h_addr, &addr->addrV6,
+ sizeof(addr->addrV6)) == 0)
break;
}
ares_free_hostent(*host);
@@ -1,4 +1,3 @@
-/* $Id$ */
/* Copyright 1998 by the Massachusetts Institute of Technology.
*
@@ -151,8 +150,8 @@ static void next_lookup(struct host_query *hquery, int status_code)
}
else {
hquery->sent_family = AF_INET;
- ares_search(hquery->channel, hquery->name, C_IN, T_A, host_callback,
- hquery);
+ ares_search(hquery->channel, hquery->name, C_IN, T_A,
+ host_callback, hquery);
}
return;
@@ -195,9 +194,10 @@ static void host_callback(void *arg, int status, int timeouts,
{
status = ares_parse_aaaa_reply(abuf, alen, &host, NULL, NULL);
if (status == ARES_ENODATA || status == ARES_EBADRESP) {
- /* The query returned something but either there were no AAAA records (e.g. just CNAME)
- or the response was malformed. Try looking up A instead.
- We should possibly limit this attempt-next logic to AF_UNSPEC lookups only. */
+ /* The query returned something but either there were no AAAA
+ records (e.g. just CNAME) or the response was malformed. Try
+ looking up A instead. We should possibly limit this
+ attempt-next logic to AF_UNSPEC lookups only. */
hquery->sent_family = AF_INET;
ares_search(hquery->channel, hquery->name, C_IN, T_A,
host_callback, hquery);
@@ -208,10 +208,12 @@ static void host_callback(void *arg, int status, int timeouts,
}
end_hquery(hquery, status, host);
}
- else if ((status == ARES_ENODATA || status == ARES_EBADRESP || status == ARES_ETIMEOUT) && hquery->sent_family == AF_INET6)
+ else if ((status == ARES_ENODATA || status == ARES_EBADRESP ||
+ status == ARES_ETIMEOUT) && hquery->sent_family == AF_INET6)
{
- /* The AAAA query yielded no useful result. Now look up an A instead.
- We should possibly limit this attempt-next logic to AF_UNSPEC lookups only. */
+ /* The AAAA query yielded no useful result. Now look up an A instead.
+ We should possibly limit this attempt-next logic to AF_UNSPEC lookups
+ only. */
hquery->sent_family = AF_INET;
ares_search(hquery->channel, hquery->name, C_IN, T_A, host_callback,
hquery);
@@ -235,8 +237,8 @@ static void end_hquery(struct host_query *hquery, int status,
/* If the name looks like an IP address, fake up a host entry, end the
* query immediately, and return true. Otherwise return false.
*/
-static int fake_hostent(const char *name, int family, ares_host_callback callback,
- void *arg)
+static int fake_hostent(const char *name, int family,
+ ares_host_callback callback, void *arg)
{
struct hostent hostent;
char *aliases[1] = { NULL };
@@ -346,8 +348,8 @@ static int file_lookup(const char *name, int family, struct hostent **host)
char tmp[MAX_PATH];
HKEY hkeyHosts;
- if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, WIN_NS_NT_KEY, 0, KEY_READ, &hkeyHosts)
- == ERROR_SUCCESS)
+ if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, WIN_NS_NT_KEY, 0, KEY_READ,
+ &hkeyHosts) == ERROR_SUCCESS)
{
DWORD dwLength = MAX_PATH;
RegQueryValueEx(hkeyHosts, DATABASEPATH, NULL, NULL, (LPBYTE)tmp,
@@ -408,8 +410,8 @@ static int file_lookup(const char *name, int family, struct hostent **host)
return status;
}
-static void sort_addresses(struct hostent *host, const struct apattern *sortlist,
- int nsort)
+static void sort_addresses(struct hostent *host,
+ const struct apattern *sortlist, int nsort)
{
struct in_addr a1, a2;
int i1, i2, ind1, ind2;
@@ -464,8 +466,8 @@ static int get_address_index(const struct in_addr *addr,
return i;
}
-static void sort6_addresses(struct hostent *host, const struct apattern *sortlist,
- int nsort)
+static void sort6_addresses(struct hostent *host,
+ const struct apattern *sortlist, int nsort)
{
struct ares_in6_addr a1, a2;
int i1, i2, ind1, ind2;
@@ -1,4 +1,3 @@
-/* $Id$ */
/* Copyright 2005 by Dominick Meglio
*
@@ -81,7 +80,8 @@ struct nameinfo_query {
(sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"))
#endif
-static void nameinfo_callback(void *arg, int status, int timeouts, struct hostent *host);
+static void nameinfo_callback(void *arg, int status, int timeouts,
+ struct hostent *host);
static char *lookup_service(unsigned short port, int flags,
char *buf, size_t buflen);
#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
@@ -202,7 +202,8 @@ void ares_getnameinfo(ares_channel channel, const struct sockaddr *sa,
}
}
-static void nameinfo_callback(void *arg, int status, int timeouts, struct hostent *host)
+static void nameinfo_callback(void *arg, int status, int timeouts,
+ struct hostent *host)
{
struct nameinfo_query *niquery = (struct nameinfo_query *) arg;
char srvbuf[33];
@@ -221,8 +222,8 @@ static void nameinfo_callback(void *arg, int status, int timeouts, struct hosten
service = lookup_service(niquery->addr.addr6.sin6_port,
niquery->flags, srvbuf, sizeof(srvbuf));
}
- /* NOFQDN means we have to strip off the domain name portion.
- We do this by determining our own domain name, then searching the string
+ /* NOFQDN means we have to strip off the domain name portion. We do
+ this by determining our own domain name, then searching the string
for this domain name and removing it.
*/
#ifdef HAVE_GETHOSTNAME
@@ -239,7 +240,8 @@ static void nameinfo_callback(void *arg, int status, int timeouts, struct hosten
}
}
#endif
- niquery->callback(niquery->arg, ARES_SUCCESS, niquery->timeouts, (char *)(host->h_name),
+ niquery->callback(niquery->arg, ARES_SUCCESS, niquery->timeouts,
+ (char *)(host->h_name),
service);
return;
}
@@ -248,12 +250,15 @@ static void nameinfo_callback(void *arg, int status, int timeouts, struct hosten
{
char ipbuf[IPBUFSIZ];
if (niquery->family == AF_INET)
- ares_inet_ntop(AF_INET, &niquery->addr.addr4.sin_addr, ipbuf, IPBUFSIZ);
+ ares_inet_ntop(AF_INET, &niquery->addr.addr4.sin_addr, ipbuf,
+ IPBUFSIZ);
else
{
- ares_inet_ntop(AF_INET6, &niquery->addr.addr6.sin6_addr, ipbuf, IPBUFSIZ);
+ ares_inet_ntop(AF_INET6, &niquery->addr.addr6.sin6_addr, ipbuf,
+ IPBUFSIZ);
#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
- append_scopeid(&niquery->addr.addr6, niquery->flags, ipbuf, sizeof(ipbuf));
+ append_scopeid(&niquery->addr.addr6, niquery->flags, ipbuf,
+ sizeof(ipbuf));
#endif
}
/* They want a service too */
@@ -266,7 +271,8 @@ static void nameinfo_callback(void *arg, int status, int timeouts, struct hosten
service = lookup_service(niquery->addr.addr6.sin6_port,
niquery->flags, srvbuf, sizeof(srvbuf));
}
- niquery->callback(niquery->arg, ARES_SUCCESS, niquery->timeouts, ipbuf, service);
+ niquery->callback(niquery->arg, ARES_SUCCESS, niquery->timeouts, ipbuf,
+ service);
return;
}
niquery->callback(niquery->arg, status, niquery->timeouts, NULL, NULL);
@@ -301,10 +307,12 @@ static char *lookup_service(unsigned short port, int flags,
sep = &se;
memset(tmpbuf, 0, sizeof(tmpbuf));
#if GETSERVBYPORT_R_ARGS == 6
- if (getservbyport_r(port, proto, &se, (void *)tmpbuf, sizeof(tmpbuf), &sep) != 0)
+ if (getservbyport_r(port, proto, &se, (void *)tmpbuf,
+ sizeof(tmpbuf), &sep) != 0)
sep = NULL;
#elif GETSERVBYPORT_R_ARGS == 5
- sep = getservbyport_r(port, proto, &se, (void *)tmpbuf, sizeof(tmpbuf));
+ sep = getservbyport_r(port, proto, &se, (void *)tmpbuf,
+ sizeof(tmpbuf));
#elif GETSERVBYPORT_R_ARGS == 4
if (getservbyport_r(port, proto, &se, (void *)tmpbuf) != 0)
sep = NULL;
@@ -350,7 +358,8 @@ static void append_scopeid(struct sockaddr_in6 *addr6, unsigned int flags,
char fmt_lu[] = "%lu";
char tmpbuf[IF_NAMESIZE + 2];
size_t bufl;
- char *fmt = (sizeof(addr6->sin6_scope_id) > sizeof(unsigned int))?fmt_lu:fmt_u;
+ char *fmt = (sizeof(addr6->sin6_scope_id) > sizeof(unsigned int))?
+ fmt_lu:fmt_u;
tmpbuf[0] = '%';
@@ -3,7 +3,6 @@
* on 2007-04-11. Lifted from version 5.2 of the 'Open Mash' project with
* the modified BSD license, BSD license without the advertising clause.
*
- * $Id$
*/
/*
@@ -1,4 +1,3 @@
-/* $Id$ */
/* Copyright (C) 2005 - 2010, Daniel Stenberg
*
Oops, something went wrong.

0 comments on commit 9c85357

Please sign in to comment.