Subject: Re: [libssh2] libssh2_sftp_close_handle: how to handle errors

Re: [libssh2] libssh2_sftp_close_handle: how to handle errors

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Thu, 24 Apr 2008 22:55:43 -0700

On Thu, Apr 24, 2008 at 08:35:34PM -0700, J.T. Conklin wrote:
> libssh2_sftp_close_handle() currently returns -1 on failure. What is
> client code supposed to do to handle this?

Good question. If the failure is due to an out of memory condition, then
trying again when more memory is available is probably the right thing.
But in other cases, like if the socket is already closed, then there's
nothing you can do. Problem is, some resources aren't freed in the latter
case, putting you into a catch-22 situation. That should really be fixed
(somehow) in the library.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
libssh2-devel mailing list
libssh2-devel_at_lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libssh2-devel
Received on 2008-04-25