cURL / Mailing Lists / curl-library / Single Mail

curl-library

Patch to work with the lastest CVS version of libssh2

From: James Housley <jim_at_thehousleys.net>
Date: Wed, 6 Jun 2007 13:10:29 -0400

With the update of libssh2 to be truely non-blocking,
libssh2_channel_readnb()
was removed since libssh2_channel_read() is non-blocking if the socket
is set that way.

Index: lib/ssh.c
===================================================================
RCS file: /cvsroot/curl/curl/lib/ssh.c,v
retrieving revision 1.34
diff -u -r1.34 ssh.c
--- lib/ssh.c 15 May 2007 00:28:50 -0000 1.34
+++ lib/ssh.c 6 Jun 2007 17:08:29 -0000
@@ -656,7 +656,7 @@
     * NOTE: we should not store nor rely on connection-related data
to be
     * in the SessionHandle struct
     */
-#ifdef LIBSSH2CHANNEL_EAGAIN
+#if defined(LIBSSH2CHANNEL_EAGAIN) && (LIBSSH2_APINO < 200706012030)
    nwrite = (ssize_t)
      libssh2_channel_writenb(conn->data->reqdata.proto.ssh-
>ssh_channel,
                              mem, len);
@@ -685,7 +685,7 @@
     * in the SessionHandle struct
     */
-#ifdef LIBSSH2CHANNEL_EAGAIN
+#if defined(LIBSSH2CHANNEL_EAGAIN) && (LIBSSH2_APINO < 200706012030)
    /* we prefer the non-blocking API but that didn't exist
previously */
    nread = (ssize_t)
      libssh2_channel_readnb(conn->data->reqdata.proto.ssh->ssh_channel,

Jim

--
/"\   ASCII Ribbon Campaign  .
\ / - NO HTML/RTF in e-mail  .
  X  - NO Word docs in e-mail .
/ \ -----------------------------------------------------------------
jeh@FreeBSD.org      http://www.FreeBSD.org     The Power to Serve
jim@TheHousleys.Net  http://www.TheHousleys.net
---------------------------------------------------------------------
Fortune Not Found:
Abort, Retry, Ignore?
Received on 2007-06-06