summaryrefslogtreecommitdiff
path: root/ares_process.c
AgeCommit message (Collapse)AuthorFilesLines
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
2006-07-28Replace send() and recv() with swrite() and sread() macros.Yang Tse1-12/+9
2006-07-222nd try adding CVS id.Gisle Vanem1-0/+2
2006-07-14Fix compiler warningYang Tse1-1/+1
2006-06-19Handle EAGAIN/EWOULDBLOCK readiness errors, which can occur for both TCP andWilliam Ahern1-5/+38
UDP even when a poll(2) or select(2) suggest otherwise.
2006-05-03Nick Mathewson added the ARES_OPT_SOCK_STATE_CB option that when set makesDaniel Stenberg1-5/+17
c-ares call a callback on socket state changes. A better way than the ares_getsock() to get full control over the socket state.
2005-12-20Changes for PellesC for Win32. It needs <unistd.h> for 'ssize_t'. Hence theGisle Vanem1-1/+2
rearrangement in ares_process.c.
2005-12-09Fix compiler warningYang Tse1-1/+1
2005-11-25read_tcp_data() fix to get the proper buffer pointer and sizeDaniel Stenberg1-2/+2
2005-11-25Yang Tse: fixed compiler warningsDaniel Stenberg1-5/+7
2005-08-10make ares compile again for NetWare.Gunter Knauf1-0/+3
2005-06-03FIONBIO is in sys/ioctl.h on AIXDaniel Stenberg1-0/+3
2005-06-02sigh, define TRUE if not alreadyDaniel Stenberg1-0/+5
2005-06-02William Ahern:Daniel Stenberg1-23/+71
Make UDP sockets non-blocking. I've confirmed that at least on Linux 2.4 a read event can come back from poll() on a valid SOCK_DGRAM socket but recv(2) will still block. This patch doesn't ignore EAGAIN in read_udp_packets(), though maybe it should. (This patch was edited by Daniel Stenberg and a new configure test was added (imported from curl's configure) to properly detect what non-blocking socket approach to use.)
2005-04-06Tupone Alfredo fixed includes of arpa/nameser_compat.h to build fine on Mac OSDaniel Stenberg1-0/+3
X.
2005-03-13Prevent gcc warning.Gisle Vanem1-1/+5
2004-10-06removed tabs and trailing whitespace from sourceDaniel Stenberg1-216/+216
2004-08-20No WSAGetLastError() on Watt-32/DOSGisle Vanem1-1/+1
2004-08-20Changes for Watt-32 on Windows. I've assumed ConfigureGisle Vanem1-3/+10
sets the required HAVE_xx defines for non-DOS/Win targets.
2004-07-29variable type fixDaniel Stenberg1-13/+14
2004-07-24Gisle Vanem:Daniel Stenberg1-19/+23
Basically in loops like handle_errors(), 'query->next' was assigned a local variable and then query was referenced after the memory was freed by next_server(). I've changed that so next_server() and end_query() returns the next query. So callers should use this ret-value. The next problem was that 'server->tcp_buffer_pos' had a random value at entry to 1st recv() (luckily causing Winsock to return ENOBUFS). I've also added a ares_writev() for Windows to streamline the code a bit more.
2004-07-22- Fixed a few variable return types for some system calls. Made configureDaniel Stenberg1-12/+18
check for ssize_t to make it possible to use that when receiving the send() error code. This is necessary to prevent compiler warnings on some systems. - Made configure create config.h, and all source files now include setup.h that might include the proper config.h (or a handicrafted alternative). - Switched to 'ares_socket_t' type for sockets in ares, since Windows don't use 'int' for that. - automake-ified and libool-ified c-ares. Now it builds libcares as a shared lib on most platforms if wanted. (This bloated the size of the release archive with another 200K!) - Makefile.am now uses Makefile.inc for the c sources, h headers and man pages, to make it easier for other makefiles to use the exact same set of files. - Adjusted 'maketgz' to use the new automake magic when building distribution archives.
2004-07-01Gisle's win32-fix. 'errno' is not used for errors when socket() fails onDaniel Stenberg1-4/+12
Windows.
2004-07-01Gisle Vanem made this build fine with djgpp and the Watt-32 stack.Daniel Stenberg1-1/+1
2004-02-27minor size_t fix to kill a warningDaniel Stenberg1-2/+2
2004-02-23make ares_expand_name() take a long * instead of an int *, since we doDaniel Stenberg1-1/+1
pointer arithmetic (ptr1 - ptr2) and to do that properly on 64bit we need long
2004-02-04don't use 'sin' as variable name as the picky compiler warnings complainDaniel Stenberg1-12/+12
about it shadowing the function sin()
2004-02-02remove rcsid stuff from c files, it serves no useful purposeDaniel Stenberg1-2/+0
2004-01-29Dirk Manske fixed a flaw in the setting of the socket to non-blockingDaniel Stenberg1-2/+4
2003-10-07ares 1.1.1 with collected applied patchesDaniel Stenberg1-0/+625