int bufsize = back->send(data, len);
if (using_sftp) { if (!scp_sftp_filehandle) { return 1; } if (!fxp_write(scp_sftp_filehandle, data, scp_sftp_fileoffset, len)) { tell_user(stderr, "error while writing: %s\n", fxp_error()); errs++; return 1; } scp_sftp_fileoffset = uint64_add32(scp_sftp_fileoffset, len); return 0; } else { int bufsize = back->send(data, len);
int scp_send_filedata(char *data, int len){    int bufsize = back->send(data, len);    /*     * If the network transfer is backing up - that is, the remote     * site is not accepting data as fast as we can produce it -     * then we must loop on network events until we have space in     * the buffer again.     */    while (bufsize > MAX_SCP_BUFSIZE) {	if (!scp_process_network_event())	    return 1;	bufsize = back->sendbuffer();    }    return 0;}