diff options
author | Nikias Bassen | 2024-07-09 11:45:10 +0200 |
---|---|---|
committer | Nikias Bassen | 2024-07-09 11:45:10 +0200 |
commit | f7e24ce6e56d67c9889744bb270ad6a98fe653f5 (patch) | |
tree | c5efab823d457c484b4cb33d4ed020a9f4efaa07 /src/ipsw.h | |
parent | 26613f928cb32fa29e31310d0e330c9c3c32085c (diff) | |
download | idevicerestore-f7e24ce6e56d67c9889744bb270ad6a98fe653f5.tar.gz idevicerestore-f7e24ce6e56d67c9889744bb270ad6a98fe653f5.tar.bz2 |
With the new AsyncDataRequestMsg we have the problem that
multiple threads would access the .ipsw, however we were
only using one struct zip* handle for the entire procedure,
resulting in read errors when concurrent access occurs.
This commit fixes it by opening the zip file for every access
separately.
Diffstat (limited to 'src/ipsw.h')
-rw-r--r-- | src/ipsw.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -33,7 +33,7 @@ extern "C" { #include <sys/stat.h> struct ipsw_archive { - struct zip* zip; + int zip; char *path; }; typedef struct ipsw_archive* ipsw_archive_t; @@ -48,6 +48,7 @@ typedef int (*ipsw_send_cb)(void *ctx, void *data, size_t size, size_t done, siz struct ipsw_file_handle { FILE* file; + struct zip* zip; struct zip_file* zfile; uint64_t size; int seekable; |