mirror of
https://github.com/curl/curl.git
synced 2026-08-26 13:53:33 +03:00
altsvc: make saving the cache an atomic operation
... by writing the file to temp name then rename to the final when done. Assisted-by: Jay Satiro Fixes #4936 Closes #4942
This commit is contained in:
parent
330f133224
commit
14916a82e2
4 changed files with 41 additions and 19 deletions
|
|
@ -5,7 +5,7 @@
|
|||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 2019 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
|
|
@ -124,7 +124,7 @@ UNITTEST_START
|
|||
}
|
||||
fail_unless(asi->num == 10, "wrong number of entries");
|
||||
|
||||
Curl_altsvc_save(asi, outname);
|
||||
Curl_altsvc_save(curl, asi, outname);
|
||||
|
||||
curl_easy_cleanup(curl);
|
||||
fail:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue