Yang Tse
0c677f578e
setup_once.h: refactor inclusion of <unistd.h> and <sys/socket.h>
...
Inclusion of these two header files now done in setup_once.h
12 years ago
Yang Tse
a1035276c1
Header inclusion clean-up
...
Remove header inclusions already done in setup_once.h
12 years ago
Daniel Stenberg
65ac7e706d
get_DNS_AdaptersAddresses: fix IPv6 parsing
...
Use of the wrong define made the function not parse IPv6 addresses
properly.
Bug: http://c-ares.haxx.se/mail/c-ares-archive-2012-06/0028.shtml
Reported by: Saúl Ibarra Corretgé
12 years ago
hpopescu@ixiacom.com
90364defb0
Added new feature (rfc2671)
12 years ago
Yang Tse
38b69b7269
Kill compiler warning
13 years ago
Nick Alcock
9bd38a4a6e
Fix UDP and TCP port byte order in saved options.
...
The UDP and TCP port are stored in network byte order in the
ares_channeldata, but are passed in to ares_init_options() in host byte
order. Thus we must return them from ares_save_options() in host byte
order too, or a duplicated channel will convert them again, leading to a
nonfunctional channel and a mysterious connection refused error from
ares_gethostbyname(). This breaks ares_dup(), thus the curl easy API
when c-ares is used by curl, and thus all the curl easy API's users.
13 years ago
Yang Tse
7ce8fe781a
ares_init.c: Further refactoring of Windows system's DNS fetching code
13 years ago
Guenter Knauf
05346c25cb
Android: small changes to dns property part.
...
Prefix prop vars; kill var; use DNS_PROP_NAME_PREFIX macro.
13 years ago
Guenter Knauf
2c67ce6459
Add support for multiple DNS servers on Android.
...
Before, c-ares always used the first DNS server on Android, causing
network problems if this DNS server was not available.
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
13 years ago
Guenter Knauf
5e80852e4c
Added some more ifdefs to silent compiler warnings.
13 years ago
Yang Tse
4980cc99e2
ares_init.c: get_iphlpapi_dns_info() refactoring
13 years ago
Guenter Knauf
8b79584e01
Kill some more compiler warnings.
13 years ago
Guenter Knauf
27a478c7a3
Kill compiler warning about unused var.
13 years ago
Guenter Knauf
58e62c5879
Fixed my last commit: wrong preprocessor directive.
13 years ago
Guenter Knauf
995fa144d9
Check for __ANDROID__ in addition to ANDROID macro.
...
Posted to c-ares list by Wayne.
13 years ago
Daniel Stenberg
506d586276
port numbers: convert them to network order!
...
When the config options ARES_OPT_UDP_PORT or ARES_OPT_TCP_PORT are used,
make sure to convert them to network byte order!
Bug: http://c-ares.haxx.se/mail/c-ares-archive-2012-02/0004.shtml
13 years ago
Daniel Stenberg
1c26242c52
white space cleanup
...
- Keep code within 80 columns
- Removed funny spaces after open paren and before closing paren
13 years ago
Poul Thomas Lomholt
73dc26a9fc
get_iphlpapi_dns_info: fix buffer overrun
...
I experienced a buffer overrun exception in c-ares on Windows and
tracked it down to be an error in the calculation of the 'left' variable
in get_iphlpapi_dns_info().
I changed the variable type of 'left' to a _signed_ type because of the
subtraction arithmetic; not sure if a long is the best choice
13 years ago
Yang Tse
4ab65461b6
ares_init.c: fix compiler warning on winsock builds
13 years ago
Yang Tse
3d84eb3bbc
ares_init.c: fix segfault triggered in ares_init_options() upon previous
...
failure of init_by_defaults() and incomplete cleanup there.
13 years ago
Yang Tse
a831da792d
fix MSVC compiler warning 'conditional expression is constant'
13 years ago
Jakub Hrozek
8e457f2c41
Fix incorrect sizeof() in ares_save_options
14 years ago
Daniel Stenberg
3cb1afe054
strlen: use size_t to receive the return
14 years ago
Yang Tse
22a52102d6
ares_init: make ares_private.h last included header again
14 years ago
Yang Tse
ef5390e6bb
winsock: compilation fixes
...
Provide winsock iphlpapi alternative definitions to prevent compilation
failures when using a variety of winsock header implementations.
14 years ago
David Stuart
6518b56a5e
IPv6-on-windows: find DNS servers correctly
14 years ago
Yang Tse
5e5c0132e6
renamed getplatform() to ares__getplatform() to avoid namespace pollution
14 years ago
Yang Tse
5b6a188909
build: move platform stuff to ares_platform.c and ares_platform.h
14 years ago
Yang Tse
bd066ab8ef
build: find out windows platform using GetVersionEx()
14 years ago
Yang Tse
8c503ddf79
System's errno.h inclusion cleanup.
...
System's errno.h is conditionally included from setup_once.h
14 years ago
Yang Tse
ef8e2ad601
ares_init: fix gethostname error detection on winsock platforms
14 years ago
Gisle Vanem
9a11973403
Watt32: fix server init
...
Somewhere in the process, programs using the Watt-32 tcp/ip stack
stopped working.
14 years ago
Dima Tisnek
e14f136aa3
config_sortlist: (win32) missing else
...
Without an else there, contents of "pat" that could have been
successfully set just above, may be clobbered by successive unsuccessful
calls to "xxx_pton" or "ip_addr".
14 years ago
Daniel Stenberg
bd6636c138
init_by_resolv_conf: fix compiler warnings
...
The code received the return codes in the 'status' variable without
using it. Instead we just ignore those particular errors.
14 years ago
Yang Tse
b2dafb6974
ares_init: fix detection of semicolon comments in resolv.conf
...
File resolv.conf may either use a hash '#' or a semicolon ';' character as an
indication that the rest of the line is a comment. This fixes not recognizing
the semicolon as a valid comment indicator in resolv.conf.
14 years ago
Yang Tse
a1c27d5480
fix compiler warning: rounding, sign extension, or loss of accuracy may result
14 years ago
Yang Tse
41b8a1bfd0
fix compiler warning: conversion may lose significant bits
14 years ago
Yang Tse
e3f7230dc2
atoi: remove atoi usage
14 years ago
Yang Tse
0ea27cdbbf
ares_init: fix compiler warning: conversion may lose significant bits
14 years ago
Daniel Stenberg
6cc3521ec9
ares_save_options: assignments instead of memcpy
14 years ago
Daniel Stenberg
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.
14 years ago
Ben Greear
f575aea364
remove all uses of uint32_t
...
Previous fix forgot a few.
Signed-off-by: Ben Greear <greearb@candelatech.com>
15 years ago
Ben Greear
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>
15 years ago
BogDan Vatra
b13c6552f8
init: allow c-ares to work on Android OS
15 years ago
Jakub Hrozek
125b1a8619
ares_init: Last, not first instance of domain or search should win
15 years ago
Daniel Stenberg
63627fa5ab
remove all $Id$ lines
15 years ago
Yang Tse
3081404dec
watt32 compilation fix
15 years ago
Yang Tse
8fe746fcf2
Added IPv6 name servers support
15 years ago
Yang Tse
10461d1414
Make usage of calloc()'s arguments consistent with rest of code base
15 years ago
Yang Tse
f157b574a9
workaround icc 9.1 optimizer issue
15 years ago