Subject: RE : About simple examples

RE : About simple examples

From: Jean-Louis CHARTON <Jean-Louis.CHARTON_at_oikialog.com>
Date: Wed, 1 Apr 2009 19:15:58 +0200

Well, it seems there are other problems in the examples.

Some of the nonblocking samples do things like this:

rc = libssh2_session_startup(session, sock);
if (rc) {
  error ...
}

rc = libssh2_userauth_password(...)
if (rc) {
   error ...
}

rc = libssh2_userauth_publickey_fromfile(...)
if (rc) {
   error ...
}

but since we are in non blocking mode, I believe the code should be:

do {
  rc = libssh2_session_startup(session, sock);
} while (rc == LIBSSH2_ERROR_EAGAIN);

if (rc) {
   error ...
}

and same thing for
libssh2_userauth_password(),libssh2_userauth_password, etc, etc

JL

------------------------------------------------------------------------------
_______________________________________________
libssh2-devel mailing list
libssh2-devel_at_lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libssh2-devel
Received on 2009-04-01