[libssh2] libssh2_session_startup: how to handle errors

2008-04-24 Thread J.T. Conklin
Hi, If libssh2_session_startup() fails, is a libssh2_session_free() needed to reclaim resources? I assume so, but the example programs just exit on return (compared with other failures, which do end up calling libssh2_session_free()). --jtc -- J.T. Conklin ---

[libssh2] libssh2_sftp_close_handle: how to handle errors

2008-04-24 Thread J.T. Conklin
Hi, libssh2_sftp_close_handle() currently returns -1 on failure. What is client code supposed to do to handle this? It appears that a non-responsive ssh/sftp server will make it impossible to close and reclaim resources for the sftp handle. If you call libssh2_sftp_shutdown() on the sftp sessio

Re: [libssh2] libssh2_session_startup: how to handle errors

2008-04-24 Thread Dan Fandrich
On Thu, Apr 24, 2008 at 08:42:36PM -0700, J.T. Conklin wrote: > If libssh2_session_startup() fails, is a libssh2_session_free() needed > to reclaim resources? I assume so, but the example programs just exit > on return (compared with other failures, which do end up calling > libssh2_session_free(

Re: [libssh2] libssh2_sftp_close_handle: how to handle errors

2008-04-24 Thread Dan Fandrich
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