mirror of
https://github.com/ckolivas/lrzip.git
synced 2025-12-06 07:12:00 +01:00
Add a control lock mutex for protecting certain control variables.
This commit is contained in:
parent
37ef39e70a
commit
4db4641dae
|
|
@ -373,6 +373,8 @@ struct rzip_control {
|
||||||
uchar *salt_pass;
|
uchar *salt_pass;
|
||||||
int salt_pass_len;
|
int salt_pass_len;
|
||||||
uchar *hash;
|
uchar *hash;
|
||||||
|
|
||||||
|
pthread_mutex_t control_lock;
|
||||||
unsigned char eof;
|
unsigned char eof;
|
||||||
unsigned char magic_written;
|
unsigned char magic_written;
|
||||||
|
|
||||||
|
|
|
||||||
1
rzip.c
1
rzip.c
|
|
@ -918,6 +918,7 @@ bool rzip_fd(rzip_control *control, int fd_in, int fd_out)
|
||||||
double chunkmbs;
|
double chunkmbs;
|
||||||
i64 free_space;
|
i64 free_space;
|
||||||
|
|
||||||
|
init_mutex(control, &control->control_lock);
|
||||||
if (!NO_MD5)
|
if (!NO_MD5)
|
||||||
md5_init_ctx(&control->ctx);
|
md5_init_ctx(&control->ctx);
|
||||||
init_mutex(control, &control->cksumlock);
|
init_mutex(control, &control->cksumlock);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue