]> granicus.if.org Git - curl/commitdiff
changed ssh.c to use HAVE_LIBSSH2_SESSION_BLOCK_DIRECTION define provided by libssh2...
authorGunter Knauf <gk@gknw.de>
Tue, 19 May 2009 23:21:25 +0000 (23:21 +0000)
committerGunter Knauf <gk@gknw.de>
Tue, 19 May 2009 23:21:25 +0000 (23:21 +0000)
lib/ssh.c
lib/ssh.h

index 961d4913977633e27ee614a32b5fd04121cb07a9..ef7ce4fe0a52d5565a45f2b3e6067b45740dcacc 100644 (file)
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -2096,7 +2096,7 @@ static int ssh_perform_getsock(const struct connectdata *conn,
                                                        number of sockets */
                                int numsocks)
 {
-#ifdef HAVE_LIBSSH2_SESSION_BLOCK_DIRECTIONS
+#ifdef HAVE_LIBSSH2_SESSION_BLOCK_DIRECTION
   int bitmap = GETSOCK_BLANK;
   (void)numsocks;
 
@@ -2123,7 +2123,7 @@ static int ssh_getsock(struct connectdata *conn,
                                                of sockets */
                        int numsocks)
 {
-#ifndef HAVE_LIBSSH2_SESSION_BLOCK_DIRECTIONS
+#ifndef HAVE_LIBSSH2_SESSION_BLOCK_DIRECTION
   (void)conn;
   (void)sock;
   (void)numsocks;
@@ -2137,7 +2137,7 @@ static int ssh_getsock(struct connectdata *conn,
 #endif
 }
 
-#ifdef HAVE_LIBSSH2_SESSION_BLOCK_DIRECTIONS
+#ifdef HAVE_LIBSSH2_SESSION_BLOCK_DIRECTION
 /*
  * When one of the libssh2 functions has returned LIBSSH2_ERROR_EAGAIN this
  * function is used to figure out in what direction and stores this info so
@@ -2188,7 +2188,7 @@ static CURLcode ssh_easy_statemach(struct connectdata *conn)
     bool block;
     result = ssh_statemach_act(conn, &block);
 
-#ifdef HAVE_LIBSSH2_SESSION_BLOCK_DIRECTIONS
+#ifdef HAVE_LIBSSH2_SESSION_BLOCK_DIRECTION
     if((CURLE_OK == result) && block) {
       int dir = libssh2_session_block_directions(sshc->ssh_session);
       curl_socket_t sock = conn->sock[FIRSTSOCKET];
index 38f91a15181b9792601ceb2ec6f2197d1841a534..a20e199054be0b0fd7bea2250b7f2bc06f3c045d 100644 (file)
--- a/lib/ssh.h
+++ b/lib/ssh.h
 #  error "SCP/SFTP protocols require libssh2 0.16 or later"
 #endif
 
-#if defined(LIBSSH2_VERSION_NUM) && (LIBSSH2_VERSION_NUM >= 0x001300)
-/* libssh2 0.19 was the planned release version for a while before it was
-   decided to instead become 1.0. Thus >= 0x001300 should still work fine
-   for snapshots done during the 0.19 days as well as things released once
-   it was bumped to 1.0 */
-#  define HAVE_LIBSSH2_SESSION_BLOCK_DIRECTIONS 1
-#else
-#  undef HAVE_LIBSSH2_SESSION_BLOCK_DIRECTIONS
-#endif
-
 #if defined(LIBSSH2_VERSION_NUM) && (LIBSSH2_VERSION_NUM >= 0x010000)
 /* libssh2_sftp_seek64() has only ever been provided by libssh2 1.0 or
    later */