curl-library
Re: libssh2 patch 10/17
Date: Thu, 19 Oct 2006 18:40:01 +0200 (CEST)
On Thu, 19 Oct 2006, James Housley wrote:
> Should build without modifications after running ./configure . At least it
> does for me.
It did so for me too. I've done successful downloads with scp.
But I did find a slight flaw when trying it. When I try to scp a file that
doesn't exist on the server, it responds:
curl: (2) failed init
... which indicates a wrong return code.
I've also checked some of your source code now and I have these comments:
1 - You don't use the "standard" transfer functions within libcurl. You
should Curl_setup_transfer() and then allow the Curl_readwrite() function
to do the actual transfer, not do the loops yourself. An interesting test
to verify this functionality is to write a test application that uses
the multi interface to do SCP transfers... This is what I spoke about in
my reply about state machines previously.
2 - You use very long source lines. We use less than 80 columns per line in
this project.
3 - The using of the environment variable HOME to get path names doesn't seem
like a thing for the library. I think those paths are better passed in to
libcurl from the app.
4 - If you use infof() to log stuff, you'd be using the libcurl way to log.
printf() is not really a good way.
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2006-10-19