It is unclear from the documentation how to proceed with
SSH_SCP_REQUEST_NEWFILE when ssh_scp_request_get_size() returns 0, i.e
downloading an empty file.

>From trial and error I found that the client has to call
ssh_scp_accept_request() and ssh_scp_read() at least once, even though
there is no data to copy. If we don't do this, we get an error "called
under invalid state" upon the next ssh_scp_pull_request().

Is this expected?

Reply via email to