Get and Put a file that doesn't exist, and their state machines didn't

transition to the cleanup state.
pull/134/head
John Safranek 2019-01-07 14:05:00 -08:00
parent 67ec3a0bad
commit 09bfe48615
1 changed files with 4 additions and 1 deletions

View File

@ -5965,7 +5965,9 @@ int wolfSSH_SFTP_Get(WOLFSSH* ssh, char* from,
if (ret != 0) {
WLOG(WS_LOG_SFTP, "Unable to open output file");
ssh->error = WS_BAD_FILE_E;
return WS_FATAL_ERROR;
ret = WS_FATAL_ERROR;
state->state = STATE_GET_CLEANUP;
continue;
}
state->state = STATE_GET_READ;
FALL_THROUGH;
@ -6128,6 +6130,7 @@ int wolfSSH_SFTP_Put(WOLFSSH* ssh, char* from, char* to, byte resume,
WLOG(WS_LOG_SFTP, "Unable to open input file");
ssh->error = WS_BAD_FILE_E;
ret = WS_FATAL_ERROR;
state->state = STATE_PUT_CLEANUP;
continue;
}
state->rSz = 0;