mirror of
https://github.com/curl/curl.git
synced 2026-06-16 23:15:38 +03:00
tests/server/tftpd.c: close upload file right after transfer
Make sure uploaded file is no longer locked after the transfer while waiting for the final ACK to be handled. Assisted-by: Daniel Stenberg Bug: #6058 Closes #6209
This commit is contained in:
parent
d18e9c580f
commit
c353207057
1 changed files with 4 additions and 5 deletions
|
|
@ -821,11 +821,6 @@ int main(int argc, char **argv)
|
||||||
sclose(peer);
|
sclose(peer);
|
||||||
peer = CURL_SOCKET_BAD;
|
peer = CURL_SOCKET_BAD;
|
||||||
|
|
||||||
if(test.ofile > 0) {
|
|
||||||
close(test.ofile);
|
|
||||||
test.ofile = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(got_exit_signal)
|
if(got_exit_signal)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -1304,6 +1299,10 @@ send_ack:
|
||||||
}
|
}
|
||||||
} while(size == SEGSIZE);
|
} while(size == SEGSIZE);
|
||||||
write_behind(test, pf->f_convert);
|
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"
|
rap->th_opcode = htons((unsigned short)opcode_ACK); /* send the "final"
|
||||||
ack */
|
ack */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue