James Housley
277bab0c7b
Check both variables, not the same one twice. Pointed out by Colin Hogben
2007-06-19 13:23:21 +00:00
Daniel Stenberg
fc3c5dae87
and fix another flaw in the singlecwd case when we get ftp://site.com/, also
...
from the #1739100 bug report
2007-06-19 12:33:28 +00:00
Daniel Stenberg
891dffb528
extra precaution to make PATH_MAX always be defined
2007-06-19 11:50:08 +00:00
James Housley
f0b361ecc1
Change rsa and rsa_pub from static arrays in ssh_conn to be dynamically
...
allocated when needed
2007-06-19 11:31:33 +00:00
James Housley
df7eed16dd
If LIBSSH2DEBUG was defined "i" was undefined
2007-06-18 22:28:40 +00:00
Daniel Stenberg
fe85ae15f3
make the ftp-method multicwd case possible to LIST the root directory of a
...
server!
2007-06-18 21:04:45 +00:00
James Housley
b61b420cb8
Curl_ssh_connect() was using an uninitialized variable in one location.
...
Caught by the auto-builds
2007-06-16 16:58:02 +00:00
Daniel Stenberg
b691102ec7
Shmulik Regev fixed a flaw in the multi interface that occurred when doing
...
HTTP CONNECT over a proxy
2007-06-14 14:42:21 +00:00
James Housley
db5d4bd811
Remove duplicate code that was left in as part of 1.35. This code
...
only affected sftp_sendquote() for the "chgrp/chmod/chown" commands.
This also fixed failure of test 614 on a system that previously failed.
2007-06-14 13:22:00 +00:00
Daniel Stenberg
dc3b3c6916
Make our own definitions of the POLL* defiens and the pollfd struct only get
...
done if the sys/poll.h file is missing, as we have seen machines with poll()
present but without the header file and machines that don't get HAVE_POLL
defined but that do have the sys/poll.h header file...
2007-06-14 11:21:48 +00:00
James Housley
82d3f97659
BUG FIX: When reading a directory listing that contains symlinks
...
with the latest libssh2, the listing would be truncated at the symlink.
Fix by looping on LIBSSH2_ERROR_EAGAIN, like the rest of the calls.
2007-06-14 10:36:53 +00:00
James Housley
f37dc9168a
Restore functionality mistakenly removed in the previous commit
2007-06-13 17:13:44 +00:00
Gisle Vanem
05ba9f9fcd
libssh2_session_free() returns void. Fix "#endif".
2007-06-13 14:01:48 +00:00
James Housley
96f4af4db9
Commit Tom Regner's code for SFTP create missing directories. This patch
...
uses the --ftp-create-dirs flag to control if cURL will try and create
directories that are specified in an upload path, but don't exist.
2007-06-13 12:15:23 +00:00
James Housley
3ec7f8a25a
Add a define to protect the state machine from older versions of libssh2,
...
ie 0.14, that don't know about newer constants used in the state machine.
2007-06-13 11:27:41 +00:00
Daniel Stenberg
375cdf89ad
With lots of help from Rich Rauenza(?) in bug #1733119 , we introduce a fairly
...
complicated work-around for 64bit HPUX compiles. We do the fix using inline
static functions to make them follow the header file properly and thus get
used fine in the test suite too etc.
2007-06-12 21:39:21 +00:00
James Housley
ab7e7144ef
* Updates for the latest version of libssh2, specifically
...
libssh2_sftp_shutdown() and libssh2_session_free() can now return
LIBSSH2_ERROR_EAGAIN.
* Fix the _send() and _recv() return values so non-blocking works
2007-06-12 21:32:45 +00:00
James Housley
6f59e19b91
While connect and transfer works fine in non-blocking mode for the test
...
suite, transfer fails in the real world. So after connect set to blocking
as full non-blocking is migrated out.
2007-06-12 16:15:20 +00:00
James Housley
73c13220ee
Prevent the state machine from getting stuck in SSH_AUTH_HOST_INIT
2007-06-12 13:47:32 +00:00
James Housley
99e0597c7b
Convert Curl_ssh_connect() to run in a state machine for
...
LIBSSH2_APINO >= 200706012030. More to come...
2007-06-12 12:31:10 +00:00
Daniel Stenberg
3247ac1918
remove unused field in the state struct
2007-06-12 08:15:02 +00:00
Daniel Stenberg
d23d686de2
restore the correct timeout time that my previous commit broke
2007-06-11 13:35:33 +00:00
Daniel Stenberg
c8677e9d3f
Properly wait for the c-ares resolve to complete, hopefully the cure for
...
bug #1733955
2007-06-11 13:32:49 +00:00
Gisle Vanem
1dcb99f0f7
constify 'hostname' in init_thread_sync_data(). Simply clear
...
the whole 'tsd' structure on exit in destroy_thread_sync_data().
2007-06-11 04:33:21 +00:00
Gisle Vanem
03bc2d34da
Squelsh some warnings for libssh older than 0.1.5.
2007-06-11 04:07:51 +00:00
James Housley
4f8ebd1673
Curl_scp_done() needs to call libssh2_channel_free() to prevent a
...
memory leak, and it is the right thing to do.
2007-06-08 16:19:21 +00:00
James Housley
cd4e6fbcac
Fix to work with the latest CVS version of libssh2
...
* As of (LIBSSH2_APINO >= 200706012030) there are not *nb() functions
* As of (LIBSSH2_APINO >= 200706012030) most libssh2_*() functions
can return LIBSSH2_ERROR_EAGAIN to indicate that the call would block.
To make the code work as previously, blocking, all the code has been
updated so that when (LIBSSH2_APINO >= 200706012030) it loops simulating
blocking. This allows the existing code to function and not hold up
the upcoming release.
2007-06-08 16:02:57 +00:00
Dan Fandrich
38b490a310
Fixed a compiler warning on uClibc.
2007-06-07 22:24:53 +00:00
Daniel Stenberg
48064f8dee
if we read zero bytes from the proxy, the connection is broken and we need
...
to bail out
2007-06-05 13:42:23 +00:00
Daniel Stenberg
e71378d3c8
mark connect failures as non-connected when ConnectPlease() fails, like when
...
a connection through a socks proxy doesn't work
2007-06-05 13:41:50 +00:00
Daniel Stenberg
b10ff9791b
ouch, two conditionals were turned backwards!
2007-06-01 21:24:34 +00:00
Daniel Stenberg
86a25239ec
do the update timer stuff even when CURLM_CALL_MULTI_PERFORM is returned
2007-06-01 21:01:57 +00:00
Daniel Stenberg
4c663ba9a8
When transferring 500 downloads in parallel with a c-ares enabled build only
...
to find that it crashed miserably, and this was due to some select()isms left
in the code. This was due to API restrictions in c-ares 1.3.x, but with the
upcoming c-ares 1.4.0 this is no longer the case so now libcurl runs much
better with c-ares and the multi interface with > 1024 file descriptors in
use.
2007-05-31 11:34:32 +00:00
Daniel Stenberg
713c9f8602
Feng Tu made (lib)curl support "upload" resuming work for file:// URLs.
2007-05-31 08:59:44 +00:00
Daniel Stenberg
a49e78d9b7
Added CURLMOPT_MAXCONNECTS which is a curl_multi_setopt() option for setting
...
the maximum size of the connection cache maximum size of the multi handle.
2007-05-30 20:04:44 +00:00
Daniel Stenberg
b6820b2674
remove really annoying debug output that makes life miserable when you do
...
hundreds of parallel transfers...
2007-05-30 09:24:06 +00:00
Daniel Stenberg
8bd7197a8f
Primarily this fixes an off-by-one buffer overwrite (rare but still existing).
...
I also switched from calloc() to malloc() as a minor performance boost since
the rest of the code fills in the structs fine anyway - and they must for the
case when we use the stack-based auto variable array instead of the allocated
one.
I made the loop filling in poll_fds[] break when poll_nfds is reached as a
minor speed improvement.
2007-05-26 22:02:29 +00:00
Daniel Stenberg
fe1fe64fd4
Rob Crittenden fixed bug #1705802
...
(http://curl.haxx.se/bug/view.cgi?id=1705802 ), which was filed by Daniel
Black identifying several FTP-SSL test cases fail when we build libcurl with
NSS for TLS/SSL. Listed as #42 in KNOWN_BUGS.
2007-05-25 21:56:27 +00:00
Daniel Stenberg
c25da51913
Song Ma filed bug report #1724016
...
(http://curl.haxx.se/bug/view.cgi?id=1724016 ) noticing that downloading
glob-ranges for TFTP was broken in CVS.
2007-05-24 21:11:18 +00:00
Daniel Stenberg
05ab8d291c
stay within 80 cols
2007-05-24 21:11:00 +00:00
Daniel Stenberg
96c093f27c
Andre Guibert de Bruet fixed a memory leak when PKCS #12 parsing failed
2007-05-22 20:46:51 +00:00
Daniel Stenberg
a9d49769ff
Andre Guibert de Bruet fixed a memory leak in the function that verifies the
...
peer's name in the SSL certificate when built for OpenSSL. The leak happens
for libcurls with CURL_DOES_CONVERSIONS enabled that fail to convert the CN
name from UTF8.
2007-05-22 19:51:44 +00:00
Daniel Stenberg
d7616d8a0a
WaitForSingleObject() uses a millisecond timeout and CURL_TIMEOUT_RESOLVE is
...
counted in seconds...
2007-05-20 22:11:47 +00:00
Daniel Stenberg
826bbfc01c
better fix for the dl/ul counters
2007-05-18 10:40:43 +00:00
Daniel Stenberg
250f9670b7
Feng Tu reported that curl -w did wrong on TFTP transfers in
...
bug report #1715394 (http://curl.haxx.se/bug/view.cgi?id=1715394 ), and the
transfer-related info "variables" were indeed overwritten with zeroes wrongly
and have now been adjusted. The upload size still isn't accurate.
2007-05-18 10:32:48 +00:00
Daniel Stenberg
ed4936fd30
bail out with error codes on failures
2007-05-18 10:12:57 +00:00
Daniel Stenberg
8479785620
Feng Tu pointed out a division by zero error in the TFTP connect timeout
...
code for timeouts less than fice seconds, and also provided a fix for it.
2007-05-17 21:40:08 +00:00
Dan Fandrich
0427e94465
Added support for compiling under Minix 3.1.3 using ACK.
2007-05-17 06:04:44 +00:00
Dan Fandrich
3fef839f75
Added call to setvbuf (disabled by default for speed) to flush the
...
memdebug log file after every line and avoid losing the last few log
entries if curl crashes.
2007-05-15 00:36:56 +00:00
Dan Fandrich
ea43bb013b
Added support for quote commands before a transfer using SFTP and test
...
case 614.
Allow SFTP quote commands chmod, chown, chgrp to set a value of 0.
2007-05-15 00:28:50 +00:00