cURL / Mailing Lists / curl-library / Single Mail

curl-library

Problem with scp download

From: James Housley <jim_at_thehousleys.net>
Date: Fri, 24 Nov 2006 19:33:31 -0500

At least for me scp download doesn't ever detect it is done. Tracing
through with gdb it reads the data, but never gets any signals saying
there is no data or the connection has closed, and it looks like it
is still open. The following simple patch seems to fix it.

Index: lib/ssh.c
===================================================================
RCS file: /cvsroot/curl/curl/lib/ssh.c,v
retrieving revision 1.6
diff -u -r1.6 ssh.c
--- lib/ssh.c 24 Nov 2006 22:14:40 -0000 1.6
+++ lib/ssh.c 25 Nov 2006 00:31:30 -0000
@@ -560,6 +560,9 @@
      }
      /* download data */
      bytecount = (curl_off_t) sb.st_size;
+
+ conn->data->reqdata.maxdownload = sb.st_size;
+
      res = Curl_setup_transfer(conn, FIRSTSOCKET,
                                bytecount, FALSE, NULL, -1, NULL);
    }

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
---------------------------------------------------------------------
In theory there is no difference between theory and practice.
In practice there is no similarity.
       -- From the "I wish I'd said that" archives.
Received on 2006-11-25