Gunter Knauf
b68a4326d2
removed dependency on gettimeofday() since we use only 1 sec resolution here.
17 years ago
Yang Tse
1fe4d44ed9
Fix compiler warning: conversion from "int" to "unsigned short" may lose significant bits
17 years ago
Yang Tse
0e74c9c8cf
Renamed a variable to avoid shadowing a global declaration
17 years ago
Yang Tse
57abe9d22d
Fix compiler warning: conversion from "int" to "unsigned char"
...
may lose significant bits
17 years ago
Yang Tse
a15a88a4e6
Avoid a segfault when generating a DNS "Transaction ID" in internal
...
function init_id_key() under low memory conditions.
17 years ago
Steinar H. Gunderson
04e49e09dc
Previously, processing a large batch of timeouts was O(n^2) in the number of
...
outstanding queries, and processing a DNS response packet was O(n) in the
number of outstanding queries. To speed things up in Google, we added a few circular,
doubly-linked lists of queries that are hash-bucketed based on
the attributes we care about, so most important operations are now O(1).
It might be that the number of buckets are higher than most people would need,
but on a quick calculation it should only be 100kB or so even on a 64-bit
system, so I've let it stay as-is.
17 years ago
Steinar H. Gunderson
56ffdcefe1
Support a few more socket options, and refactor the option setting a bit. (Patch from the Google tree.)
17 years ago
Steinar H. Gunderson
b669e17544
Three fixes in one commit (sorry): a) Take care of the tcpbuf if it ends while queued for transmission, note broken servers and close them in the main loop, and store TCP socket generation number in order not to send the same query twice over the same socket.
17 years ago
Daniel Stenberg
2b43edc964
Brad House provided a fix for ares_save_options(): Apparently I overlooked
...
something with the ares_save_options() where it would try to do a malloc(0)
when no options of that type needed to be saved. On most platforms, this was
fine because malloc(0) doesn't actually return NULL, but on AIX it does, so
ares_save_options would return ARES_ENOMEM.
17 years ago
Daniel Stenberg
ad734e7b2d
Brad House's fix to hish a win32 compiler warning
18 years ago
Daniel Stenberg
403b315a3b
Vlad Dinulescu fixed two outstanding valgrind reports
18 years ago
Gunter Knauf
316c126447
few minor changes to make ares compile for NetWare CLIB architecture.
18 years ago
Daniel Stenberg
fc5a460e0e
Brad Spencer found and fixed three flaws in the code, found with the new
...
gcc 4.2.0 warning: -Waddress
18 years ago
Daniel Stenberg
49fdeb1de4
first take at detecting a random device and seeding the random key using data
...
from it in randomize_key()
18 years ago
Daniel Stenberg
7a77f24d26
Shmulik Regev brought cryptographically secure transaction IDs
18 years ago
Daniel Stenberg
f1440b2405
Brad House added ares_save_options() and ares_destroy_options() that can be
...
used to keep options for later re-usal when ares_init_options() is used.
18 years ago
Daniel Stenberg
557aad7b02
Ravi Pratap fixed a flaw in the init_by_resolv_conf() function for windows
...
that could cause it to return a bad return code.
18 years ago
Gisle Vanem
a627160041
Removed inclusion of <sys/types.h> in .c-files
...
since it's already included through "setup.h".
18 years ago
Yang Tse
679a675660
add debug messages for initialization failures
18 years ago
Yang Tse
69fa447354
use macros ERRNO, SET_ERRNO(), SOCKERRNO and SET_SOCKERRNO() for errno handling
18 years ago
Yang Tse
5dceb6d883
Oops, missing argument separator comma
18 years ago
Yang Tse
8c76cf38a7
in debug messages also show error description
18 years ago
Yang Tse
6751a208d6
Fix c-ares failing to get the search sequence of /etc/hosts and
...
DNS from /etc/nsswitch.conf, /etc/host.conf or /etc/svc.conf when
/etc/resolv.conf did not exist or was unable to read it.
18 years ago
Gisle Vanem
657c69ce9d
Added HAVE_PROCESS_H for DOS/Win32.
...
Include <process.h> for getpid() in ares_init.c.
18 years ago
Yang Tse
6f872e206a
add debug messages for initialization failures
18 years ago
Yang Tse
fb38ee15e2
compiler warning fix
18 years ago
Daniel Stenberg
6a59182e81
Michael Wallner fixed this problem: When I set domains in the options
...
struct, and there are domain/search entries in /etc/resolv.conf, the domains
of the options struct will be overridden.
18 years ago
Yang Tse
877966659d
avoid a couple of potential zero size memory allocations
18 years ago
Yang Tse
dd3b42e1ac
Replace is*() macros with our own IS*() ones.
...
Get rid of non ANSI/ISO isascii().
18 years ago
Daniel Stenberg
d3439e3332
- Guilherme Balena Versiani: I noted a strange BUG in Win32 port
...
(ares_init.c/get_iphlpapi_dns_info() function): when I disable the network
by hand or disconnect the network cable in Windows 2000 or Windows XP, my
application gets 127.0.0.1 as the only name server. The problem comes from
'GetNetworkParams' function, that returns the empty string "" as the only
name server in that case. Moreover, the Windows implementation of
inet_addr() returns INADDR_LOOPBACK instead of INADDR_NONE.
18 years ago
Gisle Vanem
f417f06ca9
Added CVS id.
19 years ago
Gisle Vanem
a5c01eed75
If CURLDEBUG defined, call curl_memdebug() if $CARES_MEMDEBUG is set.
19 years ago
Daniel Stenberg
22e34b53e4
Nick Mathewson added the ARES_OPT_SOCK_STATE_CB option that when set makes
...
c-ares call a callback on socket state changes. A better way than the
ares_getsock() to get full control over the socket state.
19 years ago
Daniel Stenberg
d07656e76d
James Bursa fixes: find the hosts file on RISC OS, and made it build with
...
newer gcc versions that no longer defines "riscos".
19 years ago
Daniel Stenberg
a8bb249d07
Alfredo Tupone provided a fix for the Windows code in get_iphlpapi_dns_info()
...
when getting the DNS server etc.
20 years ago
Daniel Stenberg
be551e6a00
killed trailing whitespace, narrowed a few lines to 80 cols
20 years ago
Daniel Stenberg
86661ab646
sortlist_alloc() is never used on win32, so ifdef out it to prevent warning
20 years ago
Daniel Stenberg
c0eb11ec6c
avoid warning on windows
20 years ago
Dominick Meglio
7012fc65d9
Made sortlist support IPv6 (this can probably use some testing)
20 years ago
Dominick Meglio
61f1399c2f
Made sortlist support CIDR matching for IPv4
20 years ago
Daniel Stenberg
b41effd113
Tupone Alfredo fixed includes of arpa/nameser_compat.h to build fine on Mac OS
...
X.
20 years ago
Daniel Stenberg
9d89bc0179
silence win32 compiler warnings
20 years ago
Daniel Stenberg
bb42658b06
silence warnings on win32 about static functions that are never used
20 years ago
Daniel Stenberg
994f16d733
untabified
20 years ago
Gisle Vanem
6c64cc8669
Replace IsNT with IS_NT().
...
Return correct timeval in windows_port.c.
Squelch gcc warnings:
use 'ares_socket_t' in ares_fds.c.
Don't cast a 'lvalue' in ares_init.c.
20 years ago
Daniel Stenberg
3e748f4b50
removed tabs and trailing whitespace from source
20 years ago
Daniel Stenberg
47bd7d7548
- Henrik Stoerner fix: got a report that Tru64 Unix (the unix from Digital
...
when they made Alpha's) uses /etc/svc.conf for the purpose fixed below for
other OSes. He made c-ares check for and understand it if present.
- Now c-ares will use local host name lookup _before_ DNS resolving by default
if nothing else is told.
20 years ago
Daniel Stenberg
405d83852a
- Henrik Stoerner: found out that C-ARES does not look at the /etc/host.conf
...
file to determine the sequence in which to search /etc/hosts and DNS. So on
systems where this order is defined by /etc/host.conf instead of a "lookup"
entry in /etc/resolv.conf, C-ARES will always default to looking in DNS
first, and /etc/hosts second.
c-ares now looks at
1) resolv.conf (for the "lookup" line);
2) nsswitch.fon (for the "hosts:" line);
3) host.conf (for the "order" line).
First match wins.
20 years ago
Gisle Vanem
6deb40acac
Changes for Watt-32 on Windows. I've assumed Configure
...
sets the required HAVE_xx defines for non-DOS/Win targets.
21 years ago
Daniel Stenberg
5d6bdc38cb
Harshal Pradhan made minor syntax change to make this build with MSVC 7.1
21 years ago