Allow socket_fd == 0 in libssh2_session_startup()

This commit is contained in:
Sara Golemon 2006-03-08 19:10:53 +00:00
parent c45992da55
commit fbcdff2161
2 changed files with 7 additions and 2 deletions

5
README
View File

@ -1,6 +1,11 @@
libssh2 - SSH2 library libssh2 - SSH2 library
====================== ======================
Version 0.14
------------
Allow socket_fd == 0 in libssh2_session_startup(). (puudeli)
Version 0.13 Version 0.13
------------ ------------

View File

@ -298,9 +298,9 @@ LIBSSH2_API int libssh2_session_startup(LIBSSH2_SESSION *session, int socket)
#ifdef LIBSSH2_DEBUG_TRANSPORT #ifdef LIBSSH2_DEBUG_TRANSPORT
_libssh2_debug(session, LIBSSH2_DBG_TRANS, "session_startup for socket %d", socket); _libssh2_debug(session, LIBSSH2_DBG_TRANS, "session_startup for socket %d", socket);
#endif #endif
if (socket <= 0) { if (socket < 0) {
/* Did we forget something? */ /* Did we forget something? */
libssh2_error(session, LIBSSH2_ERROR_SOCKET_NONE, "No socket provided", 0); libssh2_error(session, LIBSSH2_ERROR_SOCKET_NONE, "Bad socket provided", 0);
return LIBSSH2_ERROR_SOCKET_NONE; return LIBSSH2_ERROR_SOCKET_NONE;
} }
session->socket_fd = socket; session->socket_fd = socket;