Skip to content

Commit

Permalink
tests/server/tftpd.c: close upload file after transfer
Browse files Browse the repository at this point in the history
Make sure uploaded file is not locked after transfer.

Bug: curl#6058
  • Loading branch information
mback2k committed Nov 15, 2020
1 parent 24f909c commit ca2497e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/server/tftpd.c
Expand Up @@ -1304,6 +1304,10 @@ static void recvtftp(struct testcase *test, struct formats *pf)
}
} while(size == SEGSIZE);
write_behind(test, pf->f_convert);
if(test->ofile > 0) {
close(test->ofile);
test->ofile = 0;
}

rap->th_opcode = htons((unsigned short)opcode_ACK); /* send the "final"
ack */
Expand Down

0 comments on commit ca2497e

Please sign in to comment.