Yang Tse
d1717e7c90
Fix compiler warning: conditional expression is constant
2010-02-02 16:25:07 +00:00
Yang Tse
33a3753c3f
libcurl's memory.h renamed to curl_memory.h
2009-04-21 11:46:16 +00:00
Yang Tse
fa96436661
Fix TELNET transfers not being aborted upon write callback failures
2009-03-12 13:18:25 +00:00
Yang Tse
d15b8273d6
Add Curl_read() return code checking
2009-03-12 02:12:05 +00:00
Yang Tse
dd53b356ff
fix previous commit misplaced break statement
2009-03-11 04:45:18 +00:00
Yang Tse
f1db505778
Added TELNET timeout support for Windows builds
2009-03-11 04:15:33 +00:00
Daniel Stenberg
794b4da840
Indentation fixes, untabify and related whitespace-cleanup. No code changed.
2009-02-27 08:53:10 +00:00
Daniel Stenberg
07416b61e3
- Using the libssh2 0.19 function libssh2_session_block_directions(), libcurl
...
now has an improved ability to do right when the multi interface (both
"regular" and multi_socket) is used for SCP and SFTP transfers. This should
result in (much) less busy-loop situations and thus less CPU usage with no
speed loss.
2008-12-19 21:14:52 +00:00
Dan Fandrich
ea8fbb5233
Added some #ifdefs around header files and change the EAGAIN test to
...
fix compilation on Cell (reported by Jeff Curley).
2008-11-14 23:17:32 +00:00
Daniel Stenberg
b701ea36a7
moved the Curl_raw_ functions into the new lib/rawstr.c file for easier curlx_
...
inclusion by the curl tool without colliding with the curl_strequal functions.
2008-10-23 11:49:19 +00:00
Daniel Stenberg
9d16b4081e
Renamed Curl_ascii_equal to Curl_raw_equal and bugfixed the my_toupper function
...
used in strequal.c so now all test cases run fine for me again.
2008-10-16 08:23:48 +00:00
Daniel Stenberg
5175664174
fix warning
2008-10-15 21:44:49 +00:00
Daniel Stenberg
a579d67064
- Pascal Terjan filed bug #2154627
...
(http://curl.haxx.se/bug/view.cgi?id=2154627 ) which pointed out that libcurl
uses strcasecmp() in multiple places where it causes failures when the
Turkish locale is used. This is because 'i' and 'I' isn't the same letter so
strcasecmp() on those letters are different in Turkish than in English (or
just about all other languages). I thus introduced a totally new internal
function in libcurl (called Curl_ascii_equal) for doing case insentive
comparisons for english-(ascii?) style strings that thus will make "file"
and "FILE" match even if the Turkish locale is selected.
2008-10-15 21:43:48 +00:00
Dan Fandrich
8f467b4288
Removed unneeded includes of signal.h and setjmp.h
2008-09-29 21:44:50 +00:00
Yang Tse
adb974960d
fix compiler warning: enumerated type mixed with another type
2008-09-13 01:12:07 +00:00
Yang Tse
a622fd90b4
remove unnecessary typecasting of calloc()
2008-09-06 04:47:14 +00:00
Dan Fandrich
6f0a2608b4
Fixed a problem where telnet data would be lost if an EWOULDBLOCK
...
condition were encountered.
2008-06-03 18:03:11 +00:00
Daniel Stenberg
662bee7193
All static functions that were previously name Curl_* something no longer
...
use that prefix as we use that prefix only for library-wide internal global
symbols.
2007-12-08 22:50:55 +00:00
Daniel Stenberg
13648f8ccd
struct HandleData is now called struct SingleRequest, and is only for data that
...
is inited at the start of the DO action. I removed the Curl_transfer_keeper
struct completely, and I had to move out a few struct members (that had to
be set before DO or used after DONE) to the UrlState struct. The SingleRequest
struct is accessed with SessionHandle->req.
One of the biggest reasons for doing this was the bunch of duplicate struct
members in HandleData and Curl_transfer_keeper since it was really messy to
keep track of two variables with the same name and basically the same purpose!
2007-11-24 23:16:55 +00:00
Daniel Stenberg
cbd1a77ec2
if () => if()
...
while () => while()
and some other minor re-indentings
2007-11-07 09:21:35 +00:00
Dan Fandrich
33f7ac06c3
Improved telnet support by drastically reducing the number of write
...
callbacks needed to pass a buffer to the user. Instead one per byte it
is now as little as one per segment.
2007-11-07 05:52:03 +00:00
Daniel Stenberg
ad6e28073c
removed space after if and while before the parenthesis for better source code
...
consistency
2007-11-05 09:45:09 +00:00
Yang Tse
92433e596b
We use this ZERO_NULL to avoid picky compiler warnings,
...
when assigning a NULL pointer to a function pointer var.
2007-10-17 16:58:32 +00:00
Patrick Monnerat
07b6e7363d
Added per-protocol callback static tables, replacing callback ptr storage
...
in the connectdata structure by a single handler table ptr.
2007-10-12 13:36:37 +00:00
Dan Fandrich
9f44a95522
Renamed several libcurl error codes and options to make them more general
...
and allow reuse by multiple protocols. Several unused error codes were
removed. In all cases, macros were added to preserve source (and binary)
compatibility with the old names. These macros are subject to removal at
a future date, but probably not before 2009. An application can be
tested to see if it is using any obsolete code by compiling it with the
CURL_NO_OLDIES macro defined.
Documented some newer error codes in libcurl-error(3)
2007-08-30 20:34:57 +00:00
Yang Tse
f08ac86834
fix compiler warning
2007-03-25 02:30:58 +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
3a634a273a
curlassert macro replaced with DEBUGASSERT macro defined in setup_once.h
2007-02-21 19:03:20 +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
91386937ff
- Michael Wallner provided a patch that adds support for CURLOPT_TIMEOUT_MS
...
and CURLOPT_CONNECTTIMEOUT_MS that, as their names should hint, do the
timeouts with millisecond resolution instead. The only restriction to that
is the alarm() (sometimes) used to abort name resolves as that uses full
seconds. I fixed the FTP response timeout part of the patch.
Internally we now count and keep the timeouts in milliseconds but it also
means we multiply set timeouts with 1000. The effect of this is that no
timeout can be set to more than 2^31 milliseconds (on 32 bit systems), which
equals 24.86 days. We probably couldn't before either since the code did
*1000 on the timeout values on several places already.
2007-02-05 22:51:32 +00:00
Daniel Stenberg
385e612fa5
- Armel Asselin improved libcurl to behave a lot better when an easy handle
...
doing an FTP transfer is removed from a multi handle before completion. The
fix also fixed the "alive counter" to be correct on "premature removal" for
all protocols.
2007-01-16 22:22:10 +00:00
Yang Tse
de59cde155
Fix copy-paste error
2006-10-21 12:36:10 +00:00
Yang Tse
5df4be1165
Check for USE_WINSOCK instead of WIN32 where the check was done
...
to verify winsock API availability.
2006-10-18 21:05:40 +00:00
Daniel Stenberg
b7eeb6e67f
Major overhaul introducing http pipelining support and shared connection
...
cache within the multi handle.
2006-09-07 21:49:20 +00:00
Gisle Vanem
c7aae10300
Removed "#ifndef__WATCOMC__". Use "#ifdef HAVE_SYS_TIME_H" instead.
2006-08-30 16:17:06 +00:00
Gisle Vanem
59cf6fd4f0
Watcom lacks <sys/time.h>.
2006-08-29 18:45:55 +00:00
Daniel Stenberg
cfdcae4bc7
Based on a patch by Armel Asselin, the FTP code no longer re-issues the TYPE
...
command on subsequent requests on a re-used connection unless it has to.
2006-08-19 21:18:36 +00:00
Yang Tse
d157c29269
Fix compiler warnings
2006-07-19 21:14:02 +00:00
Yang Tse
f975fd03a1
Read the return value of the swrite() macro and 'print' a message in case of failure.
2006-07-12 07:33:54 +00:00
Yang Tse
58176d1484
Use platform's native types for recv() and send() arguments.
2006-07-12 05:19:00 +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
Daniel Stenberg
34e7daf989
attempt to avoid warnings in picky environments by storing options as
...
unsigned chars
2006-04-07 11:46:16 +00:00
Daniel Stenberg
a357f77c4c
nonsense change for(;;) => while(1) just to prevent gcc from warning on
...
never executed code when -Wunreachable-code is used
2005-03-15 07:48:45 +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
1a05a90f1c
David Phillips' FD_SETSIZE fix
2004-11-19 08:52:33 +00:00
Daniel Stenberg
dcea109bb5
Dan Fandrich fix: eliminates some pedantic CodeWarrior compiler warnings and
...
errors.
2004-11-18 14:04:40 +00:00
Daniel Stenberg
710e370c34
Dan Fandrich added --disable-verbose
2004-11-11 16:34:24 +00:00
Daniel Stenberg
24d47a6e07
Paul Nolan fix to make libcurl build nicely on Windows CE
2004-11-02 10:12:22 +00:00
Daniel Stenberg
39af394a1c
removed tabs and trailing whitespace from source
2004-10-06 07:50:18 +00:00
Daniel Stenberg
02c6fde11e
made telrcv() take a ssize_t argument instead of int to better match other
...
functions (and prevent warnings)
2004-08-09 08:25:39 +00:00
Daniel Stenberg
48b92c163f
fix a mingw32 build warning
2004-07-29 07:48:47 +00:00
Daniel Stenberg
090b89cc76
Variable type cleanups to please the picky MIPSPro compiler.
2004-07-01 08:10:21 +00:00
Daniel Stenberg
62f0457961
length limit the sscanf() parsing to prevent buffer overflow
2004-06-24 12:07:36 +00:00
Daniel Stenberg
c39858aac0
Source cleanups. The major one being that we now _always_ use a Curl_addrinfo
...
linked list for name resolved data, even on hosts/systems with only IPv4
stacks as this simplifies a lot of code.
2004-06-24 07:43:48 +00:00
Daniel Stenberg
d60c22572b
Curl_done() and the protocol-specific conn->curl_done() functions now all
...
take a CURLcode as a second argument, that is non-zero when Curl_done()
is called after an error was returned from Curl_do() (or similar).
2004-05-12 12:06:39 +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
Daniel Stenberg
8e935b58a2
TommyTam made a patch to handle stdin redirection for win32.
2004-04-26 07:50:51 +00:00
Daniel Stenberg
c5637baa06
make the variables that hold the result of strlen() size_t
2004-03-23 15:28:31 +00:00
Daniel Stenberg
e545e33d5f
Gisle Vanem's fixes to use CURL_SOCKET_BAD more instead of -1 for sockets.
2004-03-11 13:13:35 +00:00
Daniel Stenberg
ce5805a955
Use curl_socket_t instead of int for holding sockets. The typedefs and
...
defines are in setup.h.
2004-03-09 22:52:50 +00:00
Daniel Stenberg
2479e06848
David Byron's work on making libcurl only require winsock 1.1 on Windows
...
machines.
2004-03-03 13:32:56 +00:00
Daniel Stenberg
0612c275a7
(void) functions we don't check the return code for
2004-02-15 13:48:50 +00:00
Daniel Stenberg
5d64d657de
removed the subchar variable, it was only set and never used
2004-02-12 09:53:03 +00:00
Daniel Stenberg
dc753b8315
Gisle Vanem fixed a windows compiler warning
2004-02-05 13:25:14 +00:00
Daniel Stenberg
690b3e58b2
fix return type to silence compiler warnings
2004-02-05 09:38:10 +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
053f6c85ef
updated year in the copyright string
2004-01-07 09:19:33 +00:00
Daniel Stenberg
1e98727c55
FTPS support added as RFC2228 and the murray-ftp-auth-ssl draft describe it
2003-11-24 07:15:37 +00:00
Daniel Stenberg
c7f5476416
fixed the bug my previous change introduced
2003-10-19 05:42:49 +00:00
Daniel Stenberg
7ad69f59c7
removed gcc -Wshadow warning
2003-10-18 20:24:54 +00:00
Daniel Stenberg
83b82e4472
memory leak
2003-10-18 20:24:20 +00:00
Daniel Stenberg
749f5387c1
Gisle Vanem's IPv6-on-Windows patch applied!
2003-10-14 12:00:45 +00:00
Daniel Stenberg
f0278ca114
Removed #include <sys/resource.h>, as pointed out by Henry Bland we don't
...
need it.
2003-07-25 08:30:58 +00:00
Daniel Stenberg
52b631fade
Access the user and passwd fields from the connectdata struct now instead
...
of the sessionhandle struct, as that was not good.
2003-07-19 23:56:33 +00:00
Daniel Stenberg
308bc9d919
use CURLDEBUG instead of MALLOCDEBUG for preprocessor conditions
2003-06-26 11:22:12 +00:00
Daniel Stenberg
327e6a2b4f
Made set_local_option() properly static as reported by Rick Jones
2003-03-12 08:44:00 +00:00
Daniel Stenberg
be8f6c7f5c
Prefix defines and symbols with CURL_ to reduce the risk of colliding with
...
various system's other defines.
2003-03-12 08:40:45 +00:00
Daniel Stenberg
f70acd5979
another typecast added to please the borland compiler
2003-03-03 06:42:52 +00:00
Daniel Stenberg
ffe5c46224
Add (void) on our uses of the swrite() macro when we don't read the return
...
code as this makes compiler warnings. We *should* fix the code to deal with
the return codes instead...
2003-03-03 06:40:36 +00:00
Daniel Stenberg
39a282bffc
moved a variable declaration to remove a compiler warnings with the MSVC
...
compiler, mentioned by Andi Jahja
2003-03-02 17:20:59 +00:00
Daniel Stenberg
9121b1f41d
the strequal and strnequal should now be called with the proper curl_ prefix
2003-02-28 12:20:08 +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
512db1bc54
Added timeout support for the non-windows version.
2002-10-08 13:03:26 +00:00
Daniel Stenberg
ba4e69bebc
updated source code boilerplate/header
2002-09-03 11:52:59 +00:00
Daniel Stenberg
08ef208fb7
added disable-[protocol] support, largely provided by Miklos Nemeth
2002-06-11 11:13:01 +00:00
Daniel Stenberg
974f314f57
copyright string (year) update
2002-03-19 07:54:55 +00:00
Daniel Stenberg
f2bda5fd5b
Curl_write() now takes a different 5th argument
2002-01-16 14:47:50 +00:00
Daniel Stenberg
4931fbce49
Curl_read() now returns a negative return code if EWOULDBLOCK or similar
2002-01-14 23:14:59 +00:00
Daniel Stenberg
5a0f0023cf
replaced printf() => Curl_sendf()
2002-01-04 09:53:39 +00:00
Daniel Stenberg
6a9697387a
stdin is file descriptor 0
2001-11-29 12:48:08 +00:00
Sterling Hughes
8e91d5de8e
looks nicer and is better compatible with older vim versions
2001-10-11 09:32:19 +00:00
Daniel Stenberg
e30dcd0501
Linus Nielsen Feltzing's telnet-for-win32 fixes
2001-09-17 14:10:38 +00:00
Sterling Hughes
6147879837
Added formatting sections for emacs and vim
2001-09-07 04:01:32 +00:00
Daniel Stenberg
0ece1b5c34
Major rename and redesign of the internal "backbone" structs. Details will
...
be posted in a minute to the libcurl list.
2001-08-30 22:48:34 +00:00
Daniel Stenberg
83a5e39065
const and unsigned/signed fixes
2001-08-14 08:38:08 +00:00
Daniel Stenberg
952b3a2c0f
added memdebug.h include
2001-03-16 15:19:36 +00:00
Daniel Stenberg
f8e1fc32de
Edin Kadribaic's bug report #408488 forced a rearrange of two struct fields
...
from urldata to connectdata, quite correctly.
2001-03-14 14:11:11 +00:00
Daniel Stenberg
fe95c7dc34
removed an incorrect comment
2001-03-05 14:52:23 +00:00
Daniel Stenberg
0cb4eba002
free the struct on done
2001-03-05 14:01:13 +00:00
Daniel Stenberg
5eba359b5d
telnet without any static variables
2001-03-05 13:59:43 +00:00
Daniel Stenberg
a1d6ad2610
multiple connection support initial commit
2001-02-20 17:35:51 +00:00
Daniel Stenberg
a14aaaf23f
fixed up the telnet to work (using support from Linus Nielsen)
2001-01-31 15:05:44 +00:00
Daniel Stenberg
c41c5a0ef2
curl_read() and Curl_read() now have ssize_t in the last argument
2001-01-31 13:54:12 +00:00
Daniel Stenberg
45fdb48189
uses Curl_read() and Curl_write()
...
unfolded telwrite() instead of being a separate single function
2001-01-25 12:22:17 +00:00
Daniel Stenberg
ae0a6835bd
Transfer is now Curl_Tranfer() and transfer.h is used instead of highlevel.h
...
and download.h
2001-01-17 13:23:01 +00:00
Daniel Stenberg
4031104404
Internal symbols that aren't static are now prefixed with 'Curl_'
2001-01-05 10:11:41 +00:00
Daniel Stenberg
24dee483e9
dual-license fix
2001-01-03 09:29:33 +00:00
Daniel Stenberg
526eca191a
uses client_write()
2000-11-22 12:55:24 +00:00
Daniel Stenberg
0cff279063
new urldata ssl layout and T. Bharath brought the new SSL cert verify function
2000-10-30 11:53:40 +00:00
Daniel Stenberg
b6e18f2f66
#include "setup.h" moved first of all includes
2000-08-24 14:26:33 +00:00
Daniel Stenberg
1ef3600a07
haxx.nu => haxx.se
2000-06-20 15:31:26 +00:00
Daniel Stenberg
96dde76b99
moved here from the newlib branch
2000-05-22 14:12:12 +00:00
Daniel Stenberg
ae1912cb0d
Initial revision
1999-12-29 14:20:26 +00:00