mirror of https://github.com/wolfSSL/wolfssh.git
Merge pull request #102 from JacobBarthelmeh/sftp
break out of "put" loop if at end of file or errorpull/104/head
commit
172c5fd749
|
@ -4247,6 +4247,9 @@ int wolfSSH_SFTP_Put(WOLFSSH* ssh, char* from, char* to, byte resume,
|
|||
ret = WS_SUCCESS;
|
||||
do {
|
||||
rSz = (int)WFREAD(r, 1, WOLFSSH_MAX_SFTP_RW, fl);
|
||||
if (rSz <= 0 ) {
|
||||
break; /* either at end of file or error */
|
||||
}
|
||||
sz = wolfSSH_SFTP_SendWritePacket(ssh, handle, handleSz, pOfst,
|
||||
r, rSz);
|
||||
if (sz > 0) {
|
||||
|
|
Loading…
Reference in New Issue