1
0
mirror of https://github.com/moparisthebest/curl synced 2024-10-31 15:45:12 -04:00
Commit Graph

77 Commits

Author SHA1 Message Date
Daniel Stenberg
0d3aa8b7be Use the was_iface variable when binding a socket locally, even if no
SO_BINDTODEVICE is present, to prevent compiler warnings about the variable
2004-02-15 13:55:24 +00:00
Daniel Stenberg
fa57a8a78e Ben Greear's SO_BINDTODEVICE patch that binds to a network interface "even
more" when the previous approach. Known to work on Linux, possibly on other
platforms as well.
2004-02-13 09:50:23 +00:00
Daniel Stenberg
2d0b2f294f Oops. I broke the flow with the previous commit. 2004-02-09 11:40:00 +00:00
Daniel Stenberg
3bdc883c93 some annoying compilers warn about "(void)foo;" lines so we avoid them 2004-02-09 08:34:19 +00:00
Daniel Stenberg
6b7f169b10 only do the verifyconnect() clear magic on mpeix 2004-01-30 07:51:51 +00:00
Daniel Stenberg
bfe5568c85 added verifyconnect proto and use it correctly in the waitconnect function 2004-01-29 15:37:21 +00:00
Daniel Stenberg
76a51ef4b3 1. changed order of two include files to build fine on MPE/iX
2. now reads the socket error before check connect status, also to make us
   run fine on MPE/iX
2004-01-29 15:29:47 +00:00
Daniel Stenberg
4d17d6876e Dan Fandrich's cleanup patch to make pedantic compiler options cause less
warnings. Minor edits by me.
2004-01-29 13:56:45 +00:00
Daniel Stenberg
7052daf475 added missing parenthesis 2004-01-15 09:54:30 +00:00
Daniel Stenberg
c5c89862b2 rearranged the connect() call so that there's no interleaved #ifdef, to make
it compiler better on amigaos
2004-01-14 09:11:42 +00:00
Daniel Stenberg
053f6c85ef updated year in the copyright string 2004-01-07 09:19:33 +00:00
Daniel Stenberg
43bb20461f Peter Sylvester found a flaw in the connect code for ipv6-enabled hosts.
I guess it seldomly happens on linux and that's why it wasn't found before.
He used Solaris to notice it.

I took the opportunity to rewrite the Curl_connecthost() slightly to feature
less duplicate code in the two different versions (ipv4/ipv6).
2003-11-13 13:28:40 +00:00
Daniel Stenberg
5eee801d06 don't shadow 'socket' 2003-10-18 20:34:33 +00:00
Daniel Stenberg
7201a5a290 the previous fix left this compiler error 2003-10-15 20:37:00 +00:00
Daniel Stenberg
a9af971c59 Avoid doing getsockopt() on Windows to verify connects. It seems that this
hogs Windows machines when libcurl is being used multi-threaded (with > ~50
threads). Andrew Fuller helped us verify and test this.

According to a MSDN web page on connect(), it returns 0 when the connect
is done and thus we don't need the getsockopt() call anyway on Windows.
2003-10-15 11:42:57 +00:00
Daniel Stenberg
749f5387c1 Gisle Vanem's IPv6-on-Windows patch applied! 2003-10-14 12:00:45 +00:00
Daniel Stenberg
5c52cacc98 - Frank Ticheler provided a patch that fixes how libcurl connects to multiple
addresses, if one of them fails (ipv4-code).
2003-10-08 13:32:43 +00:00
Daniel Stenberg
57b6202eaa New code for BeOS-style non-blocking sockets, provided by Shard and
Jeremy Friesner.
2003-10-05 15:02:58 +00:00
Daniel Stenberg
96fecba190 bindlocal works for Windows! 2003-08-11 23:15:13 +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
1eef6f44ba CURLDEBUG instead of MALLOCDEBUG 2003-06-26 06:47:20 +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
871358a6e5 before checking for network interfaces using if2ip(), check that the given
name isn't an ip address
2003-05-12 13:06:48 +00:00
Daniel Stenberg
eb6130baa7 ourerrno became Curl_ourerrno() and is now available to all libcurl 2003-05-01 13:37:05 +00:00
Daniel Stenberg
652683fc04 Martin C. Martin's fix to produce an error message in case of failure
in the Curl_is_connected() function.
2003-03-11 16:28:23 +00:00
Daniel Stenberg
c3dfe50aaf Fix Curl_is_connected() even more to deal with waitconnect() return codes
even better (also based on input from Martin).
2003-02-14 09:11:51 +00:00
Daniel Stenberg
498f3985b3 geterrno() renamed to ourerrno() to prevent the name clash that occurred in
AIX 3.2.5 and possibly other OSF-like system headers.
2003-02-14 09:01:01 +00:00
Daniel Stenberg
977175d4fd Martin C. Martin's fix for multi-interface connects to non-listening ports. 2003-02-14 08:02:55 +00:00
Jean-Philippe Barette-LaPierre
beb13a1d3e added the sharing of DNS cache 2003-02-04 23:48:46 +00:00
Daniel Stenberg
a6c395c156 Duncan Wilcox reported a crash with --interface on FreeBSD when ipv6-enabled
and this has been verified to correct the problem.
2003-01-23 05:38:20 +00:00
Daniel Stenberg
f26a338a54 copyright year update in the source header 2003-01-16 21:08:12 +00:00
Daniel Stenberg
6f35ed51dc This fixed yet another connect problem with the multi interface and ipv4
stack. Kjetil Jacobsen reported and verified the fix.
2003-01-09 14:52:51 +00:00
Daniel Stenberg
747f87f61e Removed weird special multi interface condition that caused bug report
#651464.
2002-12-17 10:05:00 +00:00
Daniel Stenberg
b528bde470 conn->bits.tcpconnect now keeps track of if this connection is connected
or not
2002-12-13 16:15:19 +00:00
Daniel Stenberg
9ae920c1b6 make a little work-around for file:// in _is_connected() and voila, now the
multi interface works with file:// URLs fine (previously it crashed). This
won't make it work on Windows though...
2002-12-13 13:47:58 +00:00
Daniel Stenberg
66eb98bb0a unlock dns cache entries with a function call instead of a variable fiddle 2002-11-11 22:36:00 +00:00
Daniel Stenberg
0ff1ca30c3 ipv4-fixes for the new Curl_dns_entry struct and Curl_resolv() proto 2002-11-05 11:07:49 +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
b5bbc04ad1 return error properly when a non-blocking connect fails using the multi
interface
2002-10-12 11:18:08 +00:00
Daniel Stenberg
cac5251a98 Lukasz Czekierda correctly pointed out that curl used a bad Host: header
when talking to a IPv6-server using IPv6 IP address only.
2002-09-11 10:32:37 +00:00
Daniel Stenberg
ba4e69bebc updated source code boilerplate/header 2002-09-03 11:52:59 +00:00
Daniel Stenberg
982c5460f0 Andrew Francis removed the need for/use of MSVC pragmas 2002-08-26 17:20:29 +00:00
Daniel Stenberg
30b7a9f172 fixed a Curl_connecthost() bug, we should default to set connected to false 2002-08-12 12:01:57 +00:00
Daniel Stenberg
cb895ec335 Initial fix to make the multi interface return control while waiting for
the initial connect to "come through".

This should work fine for connect and for FTP-PASV connects. Needs massive
testing.
2002-08-12 09:43:20 +00:00
Daniel Stenberg
87afd7686f added a connect failure error message that might get empty otherwise 2002-06-12 09:48:26 +00:00
Daniel Stenberg
78473f71eb added a missing failf() for certain connect failures 2002-06-10 13:25:03 +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
36e35b6f60 allow binding the local end of a connection even when using IPv6, thus we
now have --interface working properly
2002-04-22 23:56:13 +00:00
Daniel Stenberg
308ae5cbf2 added info in to failf() lines and added a infof() call just before the
connect() so that it tells to which host and what port it is about to
attempt the connection
2002-04-10 14:20:24 +00:00
Daniel Stenberg
974f314f57 copyright string (year) update 2002-03-19 07:54:55 +00:00