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

147 Commits

Author SHA1 Message Date
38b69b7269 Kill compiler warning 2012-06-14 21:19:48 +02:00
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.
2012-05-21 22:40:45 +02:00
7ce8fe781a ares_init.c: Further refactoring of Windows system's DNS fetching code 2012-04-21 14:17:44 +02:00
05346c25cb Android: small changes to dns property part.
Prefix prop vars; kill var; use DNS_PROP_NAME_PREFIX macro.
2012-04-20 20:42:41 +02:00
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>
2012-04-19 19:16:27 +02:00
5e80852e4c Added some more ifdefs to silent compiler warnings. 2012-04-17 16:57:40 +02:00
4980cc99e2 ares_init.c: get_iphlpapi_dns_info() refactoring 2012-04-16 22:10:23 +02:00
8b79584e01 Kill some more compiler warnings. 2012-04-16 15:33:14 +02:00
27a478c7a3 Kill compiler warning about unused var. 2012-04-16 15:24:14 +02:00
58e62c5879 Fixed my last commit: wrong preprocessor directive. 2012-04-16 11:27:16 +02:00
995fa144d9 Check for __ANDROID__ in addition to ANDROID macro.
Posted to c-ares list by Wayne.
2012-04-16 10:19:07 +02:00
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
2012-03-16 16:06:03 +01:00
1c26242c52 white space cleanup
- Keep code within 80 columns

- Removed funny spaces after open paren and before closing paren
2012-02-25 22:36:50 +01:00
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
2012-02-25 22:32:24 +01:00
4ab65461b6 ares_init.c: fix compiler warning on winsock builds 2012-01-19 20:20:56 +01:00
3d84eb3bbc ares_init.c: fix segfault triggered in ares_init_options() upon previous
failure of init_by_defaults() and incomplete cleanup there.
2011-09-07 00:30:53 +02:00
a831da792d fix MSVC compiler warning 'conditional expression is constant' 2011-09-04 17:23:39 +02:00
8e457f2c41 Fix incorrect sizeof() in ares_save_options 2011-06-14 16:41:29 +02:00
3cb1afe054 strlen: use size_t to receive the return 2011-06-04 20:14:38 +02:00
22a52102d6 ares_init: make ares_private.h last included header again 2011-05-26 17:32:43 +02:00
ef5390e6bb winsock: compilation fixes
Provide winsock iphlpapi alternative definitions to prevent compilation
failures when using a variety of winsock header implementations.
2011-05-20 16:43:25 +02:00
6518b56a5e IPv6-on-windows: find DNS servers correctly 2011-05-17 11:53:13 +02:00
5e5c0132e6 renamed getplatform() to ares__getplatform() to avoid namespace pollution 2011-03-25 17:57:02 +01:00
5b6a188909 build: move platform stuff to ares_platform.c and ares_platform.h 2011-03-24 11:31:50 +01:00
bd066ab8ef build: find out windows platform using GetVersionEx() 2011-03-23 20:53:28 +01:00
8c503ddf79 System's errno.h inclusion cleanup.
System's errno.h is conditionally included from setup_once.h
2011-03-22 14:02:23 +01:00
ef8e2ad601 ares_init: fix gethostname error detection on winsock platforms 2011-03-22 13:43:34 +01:00
9a11973403 Watt32: fix server init
Somewhere in the process, programs using the Watt-32 tcp/ip stack
stopped working.
2011-02-18 13:59:00 +01:00
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".
2011-02-16 23:44:36 +01:00
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.
2010-12-27 13:18:54 +01:00
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.
2010-12-10 21:19:51 +01:00
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