Commit Graph

53 Commits

Author SHA1 Message Date
Yang Tse 483ff1ca75 Constantine Sapuntzakis threaded resolver enhancements 2010-01-25 23:50:13 +00:00
Yang Tse bfc4c33985 Constantine Sapuntzakis refactoring of async callbacks, allowing
removal of Curl_addrinfo_copy(), Curl_addrinfo6_callback(), and
Curl_addrinfo4_callback()
2010-01-22 06:36:52 +00:00
Yang Tse ccfe279117 Constantine Sapuntzakis enhancements to make memory tracking log file writing
of messages atomic, on systems where an fwrite of a memory buffer is atomic.
2010-01-18 20:22:04 +00:00
Yang Tse 3184a91ec8 VMS specific preprocessor symbol checking adjustments 2009-12-30 17:59:56 +00:00
Yang Tse 33a3753c3f libcurl's memory.h renamed to curl_memory.h 2009-04-21 11:46:16 +00:00
Yang Tse 9770899a4b Moved potential inclusion of system's malloc.h and memory.h header files to
setup_once.h.  Inclusion of each header file is based on the definition of
NEED_MALLOC_H and NEED_MEMORY_H respectively.
2009-04-21 10:26:58 +00:00
Yang Tse c2c800d863 Move curl_dofreeaddrinfo() and curl_dofreeaddrinfo()
implementation from lib/hostip6.c to lib/curl_addrinfo.c
and prototypes from lib/hostip.h to lib/curl_addrinfo.h
2008-10-30 19:02:23 +00:00
Yang Tse 0ce97f77e0 Use our Curl_addrinfo definition even when an addrinfo struct is available.
Use a wrapper function to call system's getaddrinfo().
2008-10-30 13:45:25 +00:00
Yang Tse e29f62f0a7 add null-pointer check 2008-10-27 05:29:17 +00:00
Dan Fandrich 8f467b4288 Removed unneeded includes of signal.h and setjmp.h 2008-09-29 21:44:50 +00:00
Yang Tse 4e909ee8b1 ntoa() and inet_ntoa_r() no longer used 2008-09-24 12:22:16 +00:00
Dan Fandrich 432945e422 Eliminate a unnecessary socket creation in Curl_getaddrinfo for an IPv4
address in an IPv6 capable libcurl.
2008-07-27 02:20:34 +00:00
Daniel Stenberg cbd1a77ec2 if () => if()
while () => while()
and some other minor re-indentings
2007-11-07 09:21:35 +00:00
Daniel Stenberg 54967d2a3a Thomas J. Moore provided a patch that introduces Kerberos5 support in
libcurl. This also makes the options change name to --krb (from --krb4) and
CURLOPT_KRBLEVEL (from CURLOPT_KRB4LEVEL) but the old names are still
2007-07-01 22:01:18 +00:00
Gisle Vanem c514a2a89a Removed inclusion of <sys/types.h> and <sys/stat.h> in .c-files
since they're already included through "setup.h".
2007-02-26 04:24:26 +00:00
Yang Tse a1d5983991 use macros ERRNO, SET_ERRNO(), SOCKERRNO and SET_SOCKERRNO() for errno handling 2007-02-16 18:19:35 +00:00
Daniel Stenberg e6ea8f1199 put back the correct logic, as the change dated July 11th 2006 added bad
behaviour and a socket leak
2006-07-27 22:28:53 +00:00
Yang Tse 13616f8f96 Simplify check for NEED_MALLOC_H, and make more explicit that NEED_MALLOC_H shall be defined if <malloc.h> header file must be included even when including <stdlib.h>. 2006-07-25 13:49:49 +00:00
Gisle Vanem f2aa3b21e0 Use the proper Curl_freeaddrinfo() for CURLRES_ARES. 2006-07-24 15:58:33 +00:00
Gisle Vanem 5cdbd0cf4a Constify arguments to Curl_he2ai() and Curl_addrinfo_copy(). 2006-07-21 06:21:46 +00:00
Gisle Vanem a55c70d4ae Constify 'hostname' and 'service' to various resolver functions. 2006-07-21 05:51:12 +00:00
Gisle Vanem 02938a010d Changes for combination ENABLE_IPV6 and USE_ARES. 2006-07-21 04:22:44 +00:00
Gisle Vanem d46de5ab8b Avoid warning "comparison of unsigned expression < 0 is always false" 2006-07-20 16:37:05 +00:00
Yang Tse fe22872d14 include <malloc.h> only if HAVE_MALLOC_H and NEED_MALLOC_H are both defined. 2006-07-11 21:34:23 +00:00
Yang Tse 55138753c6 Test HAVE_GETNAMEINFO definition before using GETNAMEINFO_XXX definitions. 2006-07-04 02:27:11 +00:00
Yang Tse 43369b8096 Fix compiler warning. 2006-07-03 18:38:03 +00:00
Daniel Stenberg 9bece2b313 additional renames of Curl_ourerrno => Curl_sockerrno 2006-05-05 10:24:27 +00:00
Daniel Stenberg e85e30546c Roland Blom filed bug report #1481217
(http://curl.haxx.se/bug/view.cgi?id=1481217), with follow-ups by Michele Bini
and David Byron. libcurl previously wrongly used GetLastError() on windows to
get error details after socket-related function calls, when it really should
use WSAGetLastError() instead.

When changing to this, the former function Curl_ourerrno() is now instead
called Curl_sockerrno() as it is necessary to only use it to get errno from
socket-related functions as otherwise it won't work as intended on Windows.
2006-05-04 22:39:47 +00:00
Gisle Vanem 3cbb1b2b64 Use the HAVE_MALLOC_H and HAVE_PROCESS_H defines
(more logical).
2006-04-26 17:23:28 +00:00
Yang Tse d14588120f Undo last 'fix', since it was not the proper one. 2005-12-13 13:50:22 +00:00
Yang Tse 947f9deed5 Fix compiler warning 2005-12-12 18:40:18 +00:00
Yang Tse b15f3bb969 Undo last changes 2005-12-11 23:37:58 +00:00
Yang Tse 36485e56ed Fix compiler warning and compatibility issue with the type of the parameter used in getnameinfo() to receive the length of the sockaddr struct. 2005-12-11 12:03:01 +00:00
Yang Tse c94f3e8188 Fix compiler warning 2005-12-08 19:47:33 +00:00
Daniel Stenberg cab59b4c32 Removed the use of AI_CANONNAME in the IPv6-enabled resolver functions since
we really have no use for reverse lookups of the address.

I truly hope these are the last reverse lookups we had lingering in the
code!
2005-11-08 14:45:58 +00:00
Daniel Stenberg 021e786c71 Added a dump_addrinfo() function to ease debugging of resolved names. Define
DEBUG_ADDRINFO to enable.
2005-10-20 19:40:02 +00:00
Daniel Stenberg b2be6799f2 pass a NULL pointer in the service argument (the second) if the port number
was 0 as it seems at least some AIX versions don't like a "0" string there
2005-10-10 18:28:05 +00:00
Daniel Stenberg e7093b3ca8 keep 'socktype' in the connectdata struct and make sure we use that for all
protocol sockets even if the resolved address may say otherwise
2005-09-16 21:30:08 +00:00
Daniel Stenberg 56d9624b56 John Kelly added TFTP support to libcurl. A bunch of new error codes was
added. TODO: add them to docs. add TFTP server to test suite. add TFTP to
list of protocols whereever those are mentioned.
2005-09-02 15:11:08 +00:00
Daniel Stenberg 5f0366c2cb only define _REENTRANT if not already defined, and only in setup.h 2005-04-19 23:19:23 +00:00
Daniel Stenberg 553c5a7501 include inet_pton.h 2005-03-17 19:12:15 +00:00
Daniel Stenberg 8b80ac2877 use Curl_inet_pton(), not inet_pton(). 2005-03-17 07:40:15 +00:00
Daniel Stenberg 6a2e21ec8c FTP code turned into state machine. Not completely yet, but a good start.
The tag 'before_ftp_statemachine' was set just before this commit in case
of future need.
2005-02-09 13:06:40 +00:00
Daniel Stenberg 39af394a1c removed tabs and trailing whitespace from source 2004-10-06 07:50:18 +00:00
Daniel Stenberg a231a96841 actually, we check for a numerical host using either ipv4 or ipv6, as neither
should result in a reverse dns lookup
2004-08-20 09:18:12 +00:00
Daniel Stenberg 93b61bf0d3 use inet_pton() correctly! 2004-08-20 09:11:52 +00:00
Daniel Stenberg c8c47768c7 Ling Thio pointed out that getaddrinfo() reverse-lookups ip-only names, and
this is an attempt to prevent it from doing that. affects ipv6-enabled only.
2004-08-19 06:44:19 +00:00
Daniel Stenberg 785bad388b Gisle cleaned up remaining host resolve re-org issues 2004-06-24 14:39:52 +00:00
Daniel Stenberg 9f341f9ce5 Gisle Vanem's improved verbose output and timeout handling when connecting to
a host name that resolves to multiple IP addresses.
2004-06-10 11:06:21 +00:00
Daniel Stenberg bbafb2eb27 curl_global_init_mem() allows the memory functions to be replaced.
memory.h is included everywhere for this.
2004-05-11 11:30:23 +00:00