cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libssh2 patch 11/10

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sat, 11 Nov 2006 21:58:53 +0100 (CET)

On Fri, 10 Nov 2006, James Housley wrote:

> Okay this integrates Curl_scp_connect() and Curl_sftp_connect(). The two
> structures are also combined.

Nice. Good to see fine progress!

The two servers I tried both use publickey auth and none of these seemed to
work...

But otherwise I have these comments on the patch:

1 - it uses strlen(), malloc(), memcpy() on several places where just a simple
     strdup() would make less code

2 - the patch uses S_IFDIR, S_IFLNK and similar which aren't libssh2-symbols!
     Shouldn't these use LIBSSH2_SFTP_TYPE_DIRECTORY, LIBSSH2_SFTP_TYPE_SYMLINK
     and family instead? Remember that the local host might not have support
     for this, but still get info about such data from the server.

     Oddly enough, I can't find S_IRUSR, S_IWUSR etc provided by libssh2?

3 - Curl_sftp_recv/send and Curl_scp_send/recv are declared to return int but
     returns ssize_t. But I also see that this mistake is done in a similar
     style for Curl_ssl_send() as well, so you're hardly alone...

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2006-11-11