1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00
Commit Graph

103 Commits

Author SHA1 Message Date
Daniel Stenberg
749f5387c1 Gisle Vanem's IPv6-on-Windows patch applied! 2003-10-14 12:00:45 +00:00
Daniel Stenberg
022996e5c7 Dirk Manske made the share-locking around DNS lookups a bit "looser" so that
multiple DNS lookups can run simultaneously faster. The downside is that
resolving the same host name now can be made at once from multiple threads,
but the upside is that threads now don't alwys have to wait for the others'
resolves. Test case 506 updated accordingly.
2003-10-12 13:57:41 +00:00
Daniel Stenberg
a0118fb390 just re-indented some code 2003-10-05 15:03:21 +00:00
Daniel Stenberg
343291ce37 Based on a patch provided by Siddhartha Prakash Jain. In Curl_resolv() when
my_getaddrinfo() has been called (and wait has been set to TRUE), we check
if the name already is resolved and if so don't return wait status to the
parent. This can happen with IP-only names.
2003-10-04 14:50:45 +00:00
Daniel Stenberg
2297eca103 Added CURLOPT_IPRESOLVE support 2003-09-19 15:16:47 +00:00
Daniel Stenberg
14597475b1 Jeff Pohlmeyer did some marvelous debugging to track this one down. We MUST
NOT free the existing hash entry when we try to add a new one that matches
an existing entry. We now instead free the new one, and make the parent
function use the old entry's struct instead.
2003-09-14 21:17:54 +00:00
Daniel Stenberg
c1f31180a2 Curl_is_resolved(): FD_ZERO the file descriptors before we call ares_fds().
Problem tracked down by Bjorn Reese.
2003-09-11 21:27:19 +00:00
Daniel Stenberg
5629eeaec2 The error buffer was not getting filled when Curl_wait_for_resolv() fails.
Jeff Pohlmeyer fixed.
2003-09-01 08:21:08 +00:00
Daniel Stenberg
7e7d89471a use proper type to prevent compiler warning 2003-08-22 12:25:47 +00:00
Daniel Stenberg
e67d15b50e Vincent Sanders provided a fix for name resolving when linked with uClibc. 2003-08-21 12:07:47 +00:00
Daniel Stenberg
b1da98170f make sure the 'done' variable is always set to something in the
Curl_is_resolved() function
2003-08-19 23:23:45 +00:00
Daniel Stenberg
33cf204e9a don't set done==TRUE if the host name doesn't resolve 2003-08-19 09:29:59 +00:00
Daniel Stenberg
62b65a5f20 make it build without ares support
make sure it set async false even when using ipv6 (made test case 20 fail
before)
2003-08-06 15:26:02 +00:00
Daniel Stenberg
b73612392d ares awareness/usage/support added. If configure --enable-ares is used, we
build libcurl to use ares for asynch name resolves.
2003-08-05 14:40:59 +00:00
Daniel Stenberg
556ce1c6a1 minor code style fix 2003-07-23 12:55:24 +00:00
Daniel Stenberg
308bc9d919 use CURLDEBUG instead of MALLOCDEBUG for preprocessor conditions 2003-06-26 11:22:12 +00:00
Daniel Stenberg
9a6566e774 Gisle Vanem's code for not trusting h_aliases to always be non-NULL 2003-05-20 09:41:39 +00:00
Daniel Stenberg
e615d117a0 Setup and use CURL_INADDR_NONE all over instead of INADDR_NONE. We setup
the define accordingly in the hostip.h header to work nicely all over.
2003-05-13 12:12:17 +00:00
Daniel Stenberg
0821447b5b spell fix 2003-04-03 16:11:47 +00:00
Daniel Stenberg
b28b616eb2 typecast the conversion from const char * to char * 2003-03-19 09:16:59 +00:00
Daniel Stenberg
8d5ac8b43c AIX 4.3 or later should use gethostbyname() and not the *_r() version. 2003-03-03 22:23:48 +00:00
Jean-Philippe Barette-LaPierre
beb13a1d3e added the sharing of DNS cache 2003-02-04 23:48:46 +00:00
Daniel Stenberg
a7c72b7abf removed the local variables for emacs and vim, use the new sample.emacs
way for emacs, and vim users should provide a similar non-polluting style
2003-01-29 10:14:20 +00:00
Daniel Stenberg
f26a338a54 copyright year update in the source header 2003-01-16 21:08:12 +00:00
Daniel Stenberg
e879e26a5b EAGAIN on older (correct) glibc versions indicate a problem and not the need
for a bigger buffer and this is indeed badness for us. Making this work
on both old and new glibc versions require an ugly loop that in its worse
form cause 45 bad loops when using the correct glibc and a non-resolving
host name... :-/

We want a better fix. Badly.
2002-12-16 11:33:44 +00:00
Daniel Stenberg
7df5677b46 fixed Curl_freeaddrinfo() to only free addrinfo, and added Curl_freednsinfo()
for freeing single dns cache entries
2002-11-26 09:41:54 +00:00
Daniel Stenberg
ca6e770837 The test for DNS cache entries left locked is now only built if
AGGRESIVE_TEST is also defined, as an addition to MALLOCDEBUG. It doesn't
work for multi interface usage and should only be used with careful
consideration.
2002-11-11 22:51:09 +00:00
Daniel Stenberg
2cff251863 Curl_resolv() now returns a different struct, and it contains a reference
counter so that the caller needs to decrease that counter when done with
the returned data.

If compiled with MALLOCDEBUG I've added some extra checking that the counter
is decreased before a handle is closed etc.
2002-11-05 10:51:41 +00:00
Daniel Stenberg
5bc78cb724 Disable the DNS cache (by setting the timeout to 0) made libcurl leak
memory. Avery Fay brought the example code that proved this.
2002-10-31 13:09:11 +00:00
Daniel Stenberg
32c03eadd6 glibc 2.2.93 gethostbyname_r() no longer returns ERANGE if the given buffer
size isn't big enough. For some reason they now return EAGAIN.

Redhat 8 ships with this glibc version.
2002-10-21 13:20:30 +00:00
Daniel Stenberg
84fa12c885 Cris Bailiff found this flaw, gethostbyname_r() on linux returns 0 even
when it can't lookup the name (at least in some cases) and thus we need
to make an extra check to detect failures.
2002-09-30 08:07:16 +00:00
Daniel Stenberg
ba4e69bebc updated source code boilerplate/header 2002-09-03 11:52:59 +00:00
Daniel Stenberg
7438c378be prevent compiler warning 2002-08-30 11:10:50 +00:00
Daniel Stenberg
ca5678c8c1 attempted hpux fix for resolves 2002-08-08 22:44:43 +00:00
Daniel Stenberg
7f8ad34ba2 Glen Nakamura made his fix look even better! 2002-06-26 15:39:23 +00:00
Daniel Stenberg
a33e89b44a Glen Nakamura's patch for Curl_getaddrinfo(). 2002-06-26 08:03:46 +00:00
Daniel Stenberg
3c49b405de Now uses sigsetjmp() and siglongjmp() to bail out from slow name lookups in
case a timeout is set. This seems to work. God knows if it is good enough
or what kind of side-effects we introduce here and now.

I'll close my eyes and cross my fingers. Hard.
2002-06-11 15:10:18 +00:00
Daniel Stenberg
11ba367fc9 getaddrinfo() failures now show port number too in informational output 2002-06-10 13:26:02 +00:00
Daniel Stenberg
0db227f55e hostcache_fixoffset() is now corrected to work on 64bit architectures
Bug report #564585.
2002-06-05 13:41:33 +00:00
Daniel Stenberg
9263652c6d Fixes bug report #556930 - we need to make sure that the data is all right
after we've realloc() the packed hostent struct.
2002-05-17 07:49:28 +00:00
Daniel Stenberg
b1becd0ed5 Jacky Lam's fix to make the realloc() of the hostent data work properly
even when the realloc() actually gets a new memory block
2002-05-01 11:36:13 +00:00
Daniel Stenberg
8358505b6d Now uses Curl_ as prefix for internal global symbols. curl_ should only be
used for "exported" globals.
2002-04-27 13:07:51 +00:00
Daniel Stenberg
8927ddec16 In order to not get problems with DNS cache pruning, we no longer store
any name resolved data in any curl handle struct. That way, we won't mind
if the cache entries are pruned for the next time we need them. We'll just
resolve them again instead.

This changes the Curl_resolv() proto. It modifies the SessionHandle struct
but perhaps most importantly, it'll make the internals somewhat dependent
on the DNS cache not being disabled as that will cripple operations somewhat.
Especially for persistant connections.
2002-04-25 19:00:57 +00:00
Daniel Stenberg
db6d4bcf47 the 80 column police narrowed this source code! B-] 2002-04-23 14:56:21 +00:00
Daniel Stenberg
53a9fdf078 use sclose() to close sockets 2002-04-22 23:53:49 +00:00
Daniel Stenberg
21fc402c01 Jacky Lam's adjust resolve-buffer size patch applied. Slightly edited
by Daniel.
2002-04-22 13:31:16 +00:00
Daniel Stenberg
381f77756d pack_hostent does not handle 64 bit pointers correctly.
A Bjørn Reese patch.
2002-04-19 11:00:26 +00:00
Sterling Hughes
a386562d9a Prune old hostcache entries with each call...
This can be optimized a tidbit, but this is a start.
2002-04-17 20:13:55 +00:00
Daniel Stenberg
974f314f57 copyright string (year) update 2002-03-19 07:54:55 +00:00
Daniel Stenberg
fb29529a52 Jun-ichiro itojun Hagino <itojun@itojun.org>:
Now first check if IPv6 is supported, then use PF_UNSPEC. If not, use PF_INET.
It'll solve both the "slow name lookup" problem on IPv4 and still work fine on
IPv6 hosts.

Bug report #530204 has more details:
http://sourceforge.net/tracker/?func=detail&atid=100976&aid=530204&group_id=976
2002-03-15 09:54:30 +00:00