1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-11-03 22:13:11 +03:00

libssh2_publickey_init: fixed to work better non-blocking

This was triggered by a clang-analyzer complaint that turned out
to be valid, and it made me dig deeper and fix some generic non-
blocking problems I disovered in the code.

While cleaning this up, I moved session-specific stuff over to a
new session.h header from the libssh2_priv.h header.
This commit is contained in:
Daniel Stenberg
2010-04-24 20:21:22 +02:00
parent c5602fac58
commit 000b0f73d0
8 changed files with 164 additions and 98 deletions

View File

@@ -1,5 +1,5 @@
/* Copyright (c) 2004-2007 Sara Golemon <sarag@libssh2.org>
* Copyright (c) 2009 by Daniel Stenberg
* Copyright (c) 2009-2010 by Daniel Stenberg
* Copyright (c) 2010 Simon Josefsson <simon@josefsson.org>
* All rights reserved.
*
@@ -53,6 +53,7 @@
#endif
#include "transport.h"
#include "session.h"
/* libssh2_default_alloc
*/
@@ -520,8 +521,8 @@ libssh2_session_callback_set(LIBSSH2_SESSION * session,
int _libssh2_wait_socket(LIBSSH2_SESSION *session)
{
int rc;
int dir;
int seconds_to_next;
int dir;
rc = libssh2_keepalive_send (session, &seconds_to_next);
if (rc < 0)