summaryrefslogtreecommitdiff
path: root/ares_process.c
AgeCommit message (Collapse)AuthorFilesLines
2009-11-18Make usage of calloc()'s arguments consistent with rest of code baseYang Tse1-1/+1
2009-11-02Renamed c-ares setup.h to ares_setup.hYang Tse1-1/+1
2009-06-19sclose() function-like macro definition used to close a socket,Yang Tse1-7/+7
now solely based on HAVE_CLOSESOCKET and HAVE_CLOSESOCKET_CAMEL config file preprocessor definitions.
2009-05-02Use build-time configured ares_socklen_t instead of socklen_tYang Tse1-1/+1
2009-04-14fix compiler warning: implicit conversion shortens 64-bit value into a ↵Yang Tse1-2/+2
32-bit value
2009-01-13- ares__send_query() now varies the retry timeout pseudo-randomly to avoidPhil Blundell1-1/+4
packet storms when several queries were started at the same time.
2008-12-04Gregor Jasny provided the patch that introduces ares_set_socket_callback(),Daniel Stenberg1-0/+22
and I edited it to also get duped by ares_dup().
2008-11-28Only set TCP_NODELAY when it existsDan Fandrich1-0/+2
2008-11-13Refactor configure script detection of functions used to set sockets intoYang Tse1-35/+18
non-blocking mode, and decouple function detection from function capability.
2008-11-01- Carlo Contavalli added support for the glibc "rotate" option, as documentedDaniel Stenberg1-23/+27
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-10-21Charles Hardin patch:Yang Tse1-11/+18
- handles the EINPROGRESS for UDP connects - uses closesocket instead of close on some paths that were noticed
2008-09-17adjust inclusion of "nameser.h"Yang Tse1-17/+15
2008-08-26Functionality only possible if recvfrom() is available.Yang Tse1-6/+9
2008-08-25Brad House's validation that DNS response address matches the request addressYang Tse1-1/+15
2008-07-10fix compiler warningYang Tse1-6/+4
2008-05-15millisecond resolution support followupYang Tse1-1/+1
2008-05-13- Introducing millisecond resolution support for the timeout option. SeeDaniel Stenberg1-39/+93
ares_init_options()'s ARES_OPT_TIMEOUTMS.
2008-05-08check for strings.h in configure and use it for the strcasecmp() protoDaniel Stenberg1-0/+3
2007-10-18Renamed internal function to avoid a variable shadowing itYang Tse1-3/+3
2007-10-08'FD_CLOXEC' is meaningless on MSDOS/Watt-32.Gisle Vanem1-2/+2
2007-10-04Removed a piece of redundant code (process_answer already takes care of it).Steinar H. Gunderson1-6/+0
2007-09-30Fix compiler warningYang Tse1-3/+3
2007-09-30check availability of <netinet/tcp.h>Yang Tse1-2/+12
2007-09-29Use ISDIGIT instead of isdigit; fixes a gcc warning.Steinar H. Gunderson1-0/+1
2007-09-29Previously, processing a large batch of timeouts was O(n^2) in the number ofSteinar H. Gunderson1-47/+108
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.
2007-09-29Fix compiler warning in setsockopt().Gisle Vanem1-8/+9
2007-09-29TCP queries can time out too, not just UDP queries. (Patch from the Google ↵Steinar H. Gunderson1-4/+3
tree.)
2007-09-29Read and process as many packets as possible in read_udp_packets, to avoid ↵Steinar H. Gunderson1-7/+11
having to run the entire event loop once per packet. (Patch from the Google tree.)
2007-09-29There are two different places in write_tcp_data() that advance the ↵Steinar H. Gunderson1-40/+35
send_queue; however, they are slightly different and only the first one properly uses a while loop. Consolidate both into a single function that DTTR. (Patch from the Google tree.)
2007-09-28Forgot to include a few hunks from ares_process.c earlier. Fixing now.Steinar H. Gunderson1-0/+2
2007-09-28Support a few more socket options, and refactor the option setting a bit. ↵Steinar H. Gunderson1-3/+52
(Patch from the Google tree.)
2007-09-28Make the query callbacks return the number of timeouts that happened during ↵Steinar H. Gunderson1-1/+1
the execution of a query, and update documentation accordingly. (Patch from the Google tree.)
2007-09-28Three fixes in one commit (sorry): a) Take care of the tcpbuf if it ends ↵Steinar H. Gunderson1-8/+105
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.
2007-09-28Don't skip a server if it's the only one. (Bugfix from the Google tree.)Steinar H. Gunderson1-5/+23
2007-09-27wrong, revert the previous "fix" and instead check that the fd_set pointerDaniel Stenberg1-22/+25
is non-NULL before we FD_CLR
2007-09-27eek, fix the conditions to return on either problem instead of requiringDaniel Stenberg1-3/+3
both to occur
2007-09-22Steinar H. Gunderson fixed: Correctly clear sockets from the fd_set on inDaniel Stenberg1-0/+21
several functions (write_tcp_data, read_tcp_data, read_udp_packets) so that if it fails and the socket is closed the following code doesn't try to use the file descriptor.
2007-09-22Steinar H. Gunderson modified c-ares to now also do to DNS retries even whenDaniel Stenberg1-3/+6
TCP is used since there are several edge cases where it still makes sense.
2007-07-14Vlad Dinulescu fixed two outstanding valgrind reportsDaniel Stenberg1-1/+2
2007-06-02Brad House fixed VS2005 compiler warnings due to time_t being 64bit.Daniel Stenberg1-2/+2
He also made recent Microsoft compilers use _strdup() instead of strdup().
2007-05-30added ares_process_fd() to allow applications to ask for processing onDaniel Stenberg1-16/+76
specific sockets and thus avoiding select() and associated functions/macros. This function will be used by upcoming libcurl releases for this very reason. It also made me export the ares_socket_t type in the public ares.h header file, since ares_process_fd() uses that type for two of the arguments.
2007-02-26Removed inclusion of <sys/types.h> in .c-filesGisle Vanem1-1/+0
since it's already included through "setup.h".
2007-02-22Check for stdbool.h at configuration stage, and include it if available.Yang Tse1-5/+1
Check for lowercase 'bool' type at configuration stage. If not available provide a suitable replacement with a type definition of 'unsigned char' in setup_once.h Move definitions of TRUE and FALSE to setup_once.h
2007-02-16use macros ERRNO, SET_ERRNO(), SOCKERRNO and SET_SOCKERRNO() for errno handlingYang Tse1-13/+7
2007-02-04Use correct 3rd argument for ioctlsocket() under Watt-32.Gisle Vanem1-0/+4
2007-02-01compiler warning fixYang Tse1-2/+2
2006-10-25Compiler warning fixYang Tse1-1/+1
2006-10-18Check for USE_WINSOCK instead of WIN32 where the check was doneYang Tse1-1/+1
to verify winsock API availability.
2006-08-29Brad Spencer didDaniel Stenberg1-0/+1
o made ares_version.h use extern "C" for c++ compilers o fixed compiler warnings in ares_getnameinfo.c o fixed a buffer position init for TCP reads
2006-07-29Fix compiler warnings.Yang Tse1-5/+7