curl-library
Re: libssh2 patch 11/1
Date: Thu, 2 Nov 2006 11:47:13 -0500
On Nov 2, 2006, at 9:49 AM, Daniel Stenberg wrote:
> On Wed, 1 Nov 2006, James Housley wrote:
>
>> Here is the latest patch. Most of the fprintf(stderr have been
>> converted to infof(), except for a few at the top of the file.
>> These could not be converted since it does not have access to the
>> curl structures. In the future they will likely be removed.
>
> I have several objections, but this time I took time to edit them
> and my updated patch is attached to this mail.
>
> We must not use "libssh2" or anything like that in the public API
> and its names, as we don't expect libssh2 to be the only SSH
> library forever, or at least we won't limit the API for the
> possibility that others will be supported one day. There's also the
> pure philosophical view that the API provides "ssh features" and
> they are based around the protocol SSH and not specificly on a
> particular SSH-lib.
>
> Therefore, we must also not depend on or expose libssh2-related
> error codes in the CURLcode type. We can indeed provide SSH-
> specific error codes (for the cases where none of the already
> existing ones are good enough), but they must be translated by the
> libssh2-aware layer into the curl-specific ones. Again, we must
> consider SSH to be a protocol feature and not something that always
> will be bound to libssh2.
>
> I now made SSH-related errors get returned in the single error code
> CURLE_SSH which is a bit too naive, so it leaves room for some
> improvements there.
>
> Oh, and I renamed lib/sftp.[ch] to lib/ssh.[ch] since I think
> that's a more suitable name.
>
> Any of my changes you're opposing? I wouldn't mind committing what
> we have, and we can base further work on that...
One concern, that may be unfounded, is the possibility of '#include
"ssh.h"' causing problems with getting the wrong include.
The only other issue is I see I left in "sftp" in version.c.
Other then that I have no objections.
Thanks,
Jim
-- /"\ ASCII Ribbon Campaign . \ / - NO HTML/RTF in e-mail . X - NO Word docs in e-mail . / \ ----------------------------------------------------------------- jeh@FreeBSD.org http://www.FreeBSD.org The Power to Serve jim@TheHousleys.Net http://www.TheHousleys.net --------------------------------------------------------------------- Progress (n) : What led from smart users in front of dumb terminals to dumb users in front of smart terminals.Received on 2006-11-02