cURL / Mailing Lists / curl-library / Single Mail

curl-library

Converting ssh.c (sftp) to use Curl_setup_transfer()

From: James Housley <jim_at_thehousleys.net>
Date: Tue, 26 Jun 2007 15:33:48 -0400

I am about to the point, for download lets say, to use
Curl_setup_transfer(). Looking at the attached lib/ssh.c at line
1490. I obviously need to remove the #if 0/#endif, and add a state
(conn, SSH_STOP); break; But the problem I am having is it isn't
working, and I am not sure it will. The SSH protocols require both
transmitting and receiving to receive data (and transmit too). So
the socket that gets passed in for a download will only be checked
for data to read, but part of the time it will need to be checked
that it is okay to transmit.

Is the most correct way to implement these protocols is to not use
Curl_setup_transfer() and just do the reads in the state machine.
Using the state machine will return in multi mode when blocking would
occur.

Jim

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