1
0
mirror of https://frontier.innolan.net/rainlance/c-ares.git synced 2025-10-06 08:19:40 +00:00
Commit Graph

116 Commits

Author SHA1 Message Date
a1c27d5480 fix compiler warning: rounding, sign extension, or loss of accuracy may result 2010-12-02 18:49:15 +01:00
41b8a1bfd0 fix compiler warning: conversion may lose significant bits 2010-12-01 23:36:19 +01:00
e3f7230dc2 atoi: remove atoi usage 2010-11-29 02:22:08 +01:00
0ea27cdbbf ares_init: fix compiler warning: conversion may lose significant bits 2010-11-28 20:56:17 +01:00
6cc3521ec9 ares_save_options: assignments instead of memcpy 2010-10-05 19:42:39 +02:00
803e2a28b7 init_by_options: don't copy an empty sortlist
If there aren't any sort items to copy, don't bother. Without this
little precaution it would do a malloc(0) which causes undefined
behaviors and is frowned upon by curl's memdebug-system.
2010-10-05 19:40:35 +02:00
f575aea364 remove all uses of uint32_t
Previous fix forgot a few.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2010-07-30 10:09:57 -07:00
e3b04e5a47 local-bind: Support binding to local interface/IPs
Add 3 new functions to set the local binding for the out-going
socket connection, and add ares_set_servers_csv() to set a
list of servers at once as a comma-separated string.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2010-07-18 23:58:39 +02:00
b13c6552f8 init: allow c-ares to work on Android OS 2010-06-11 10:47:00 +02:00
125b1a8619 ares_init: Last, not first instance of domain or search should win 2010-06-02 23:12:04 +02:00
63627fa5ab remove all $Id$ lines 2010-03-27 19:42:02 +01:00
3081404dec watt32 compilation fix 2010-03-09 17:59:35 +00:00
8fe746fcf2 Added IPv6 name servers support 2010-03-05 20:01:47 +00:00
10461d1414 Make usage of calloc()'s arguments consistent with rest of code base 2009-11-18 10:33:54 +00:00
f157b574a9 workaround icc 9.1 optimizer issue 2009-11-18 02:57:34 +00:00
ea29eeb4eb Renamed fpGetNetworkParams and fpSystemFunction036 to avoid namespace pollution with static library 2009-11-11 08:56:46 +00:00
39c0bac44c Test for USE_WINSOCK since it is more restrictive than WIN32 2009-11-09 12:57:26 +00:00
a82a8fbf82 Renamed c-ares setup.h to ares_setup.h 2009-11-02 11:55:53 +00:00
ec11480d8b Fix compiler warning: loop without body 2009-10-10 12:29:32 +00:00
f3346ca16b Fix compiler warning 2009-10-08 18:38:29 +00:00
85442b2a4b Attempt to silence bogus compiler warning: "Potential null pointer dereference" 2009-09-17 11:45:27 +00:00
a65d11ee13 Suppress warnings about unused prototypes in Watt32 and Win32 programs. 2009-09-07 11:02:20 +00:00
d0a8c3b68b - Joshua Kwan fixed the init routine to fill in the defaults for stuff that
fails to get inited by other means. This fixes a case of when the c-ares
  init fails when internet access is fone.
2009-08-03 11:29:17 +00:00
ea46b347bb Revert last change, it is inappropriate. 2009-06-12 23:50:33 +00:00
51a10c962a Replace CURLDEBUG with DEBUGBUILD. 2009-06-12 14:15:13 +00:00
cf3301f024 Make ares_init(), ares_dup() and ares_init_options() return ARES_ENOTINITIALIZED
if library initialization has not been performed calling ares_library_init().
2009-05-26 18:00:14 +00:00
b7c7bab713 Introduction of ares_library_init() and ares_library_cleanup() 2009-05-17 17:11:28 +00:00
27aa165e9c avoid use of alloca() 2009-04-22 10:25:28 +00:00
1509409fe1 Moved potential inclusion of system's malloc.h and memory.h header files to
setup_once.h.  Inclusion of each header file is based on the definition of
NEED_MALLOC_H and NEED_MEMORY_H respectively.
2009-04-21 10:26:58 +00:00
f61fa37f40 Gregor Jasny provided the patch that introduces ares_set_socket_callback(),
and I edited it to also get duped by ares_dup().
2008-12-04 12:53:03 +00:00
e61d4b9e21 Introduce ares_dup(3) and new thoughts about API/ABI and how to move forwards.
Also discussed on the ml.
2008-12-03 09:59:50 +00:00
7ff288f0b9 minor indent fix 2008-12-01 22:36:39 +00:00
f31add0695 Convert the public config struct to the same binary size/construct as in the
latest releases to remain ABI compatible.
2008-12-01 19:06:24 +00:00
9c51eb28fc Make use of gethostname() conditional on it being available 2008-11-28 22:41:14 +00:00
aa1534eb20 In preparation for the upcomming IPv6 nameservers patch, the internal
ares_addr union is now changed into an internal struct which also holds
the address family.
2008-11-25 16:26:58 +00:00
acf5ca090a use unsigned short better intead of mixing with ints to prevent compiler
warnings
2008-11-20 07:50:48 +00:00
1a1b4eb4f2 - Carlo Contavalli added support for the glibc "rotate" option, as documented
in man resolv.conf:

  causes round robin selection of nameservers from among those listed.  This
  has the effect of spreading the query load among all listed servers, rather
  than having all clients try the first listed server first every time.

  You can enable it with ARES_OPT_ROTATE
2008-11-01 18:35:19 +00:00
f214b583f5 adjust inclusion of "nameser.h" 2008-09-17 01:02:57 +00:00
507c529dc0 code cleanup 2008-09-16 18:43:25 +00:00
f2582d6949 include header file only when available 2008-09-15 17:14:29 +00:00
2cb5cbba34 move inclusion of ares_private.h last 2008-09-11 03:46:47 +00:00
f33bd94c05 remove unnecessary typecasting of malloc() 2008-09-06 05:29:05 +00:00
3f1bde7664 - Fix by Tofu Linden:
The symptom:
  * Users (usually, but not always) on 2-Wire routers and the Comcast service
  and a wired connection to their router would find that the second and
  subsequent DNS lookups from fresh processes using c-ares to resolve the same
  address would cause the process to never see a reply (it keeps polling for
  around 1m15s before giving up).

  The repro:
  * On such a machine (and yeah, it took us a lot of QA to find the systems
  that reproduce such a specific problem!), do 'ahost www.secondlife.com',
  then do it again.  The first process's lookup will work, subsequent lookups
  will time-out and fail.

  The cause:
  * init_id_key() was calling randomize_key() *before* it initialized
  key->state, meaning that the randomness generated by randomize_key() is
  immediately overwritten with deterministic values. (/dev/urandom was also
  being read incorrectly in the c-ares version we were using, but this was
  fixed in a later version.)
  * This makes the stream of generated query-IDs from any new c-ares process
  be an identical and predictable sequence of IDs.
  * This makes the 2-Wire's default built-in DNS server detect these queries
  as probable-duplicates and (erroneously) not respond at all.
2008-08-04 20:23:12 +00:00
705c749aa1 - As was pointed out to me by Andreas Schuldei, the MAXHOSTNAMELEN define is
not posix or anything and thus c-ares failed to build on hurd (and possibly
  elsewhere). The define was also somewhat artificially used in the windows
  port. Now, I instead rewrote the use of gethostbyname to enlarge the host
  name buffer in case of need and totally avoid the use of the MAXHOSTNAMELEN
  define. I thus also removed the defien from the namser.h file where it was
  once added for the windows build.

  I also fixed init_by_defaults() function to not leak memory in case if
  error.
2008-06-30 12:48:25 +00:00
a43aec1b56 use same time source for timeout initialization and processing 2008-05-15 00:00:19 +00:00
46dbd9461a - Introducing millisecond resolution support for the timeout option. See
ares_init_options()'s ARES_OPT_TIMEOUTMS.
2008-05-13 20:48:48 +00:00
fc4704b4d8 Improved parsing of resolver configuration files 2008-05-05 17:48:25 +00:00
cb4a169f75 Eino Tuominen improved the code when a file is used to seed the randomizer 2008-04-04 20:05:23 +00:00
b68a4326d2 removed dependency on gettimeofday() since we use only 1 sec resolution here. 2007-10-22 23:31:40 +00:00
1fe4d44ed9 Fix compiler warning: conversion from "int" to "unsigned short" may lose significant bits 2007-10-20 15:11:51 +00:00