From 2d773f93224a995587ea15b7c6915af44809fb31 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Fri, 28 Sep 2007 18:29:40 +0000 Subject: [PATCH] Stop shadowing a global declaration --- include/libssh2.h | 2 +- src/session.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/libssh2.h b/include/libssh2.h index 3e5b747..c97d563 100644 --- a/include/libssh2.h +++ b/include/libssh2.h @@ -309,7 +309,7 @@ LIBSSH2_API void **libssh2_session_abstract(LIBSSH2_SESSION *session); LIBSSH2_API void *libssh2_session_callback_set(LIBSSH2_SESSION *session, int cbtype, void *callback); LIBSSH2_API int libssh2_banner_set(LIBSSH2_SESSION *session, const char *banner); -LIBSSH2_API int libssh2_session_startup(LIBSSH2_SESSION *session, int socket); +LIBSSH2_API int libssh2_session_startup(LIBSSH2_SESSION *session, int sock); LIBSSH2_API int libssh2_session_disconnect_ex(LIBSSH2_SESSION *session, int reason, const char *description, const char *lang); #define libssh2_session_disconnect(session, description) libssh2_session_disconnect_ex((session), SSH_DISCONNECT_BY_APPLICATION, (description), "") LIBSSH2_API int libssh2_session_free(LIBSSH2_SESSION *session); diff --git a/src/session.c b/src/session.c index 11908a4..3d33b63 100644 --- a/src/session.c +++ b/src/session.c @@ -516,21 +516,21 @@ libssh2_session_callback_set(LIBSSH2_SESSION * session, * socket *must* be populated with an opened and connected socket. */ LIBSSH2_API int -libssh2_session_startup(LIBSSH2_SESSION * session, int socket) +libssh2_session_startup(LIBSSH2_SESSION * session, int sock) { int rc; if (session->startup_state == libssh2_NB_state_idle) { _libssh2_debug(session, LIBSSH2_DBG_TRANS, - "session_startup for socket %d", socket); + "session_startup for socket %d", sock); /* FIXME: on some platforms (like win32) sockets are unsigned */ - if (socket < 0) { + if (sock < 0) { /* Did we forget something? */ libssh2_error(session, LIBSSH2_ERROR_SOCKET_NONE, "Bad socket provided", 0); return LIBSSH2_ERROR_SOCKET_NONE; } - session->socket_fd = socket; + session->socket_fd = sock; session->socket_block = !_libssh2_get_socket_nonblocking(session->socket_fd);