Merging upstream version 0.24.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
b3a4316df0
commit
d842f57fc5
33 changed files with 905 additions and 882 deletions
10
decode_lz.cc
10
decode_lz.cc
|
@ -1,5 +1,5 @@
|
|||
/* Tarlz - Archiver with multimember lzip compression
|
||||
Copyright (C) 2013-2022 Antonio Diaz Diaz.
|
||||
Copyright (C) 2013-2023 Antonio Diaz Diaz.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -20,7 +20,6 @@
|
|||
#include <algorithm>
|
||||
#include <cerrno>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <queue>
|
||||
#include <pthread.h>
|
||||
#include <stdint.h> // for lzlib.h
|
||||
|
@ -37,6 +36,7 @@
|
|||
#include "arg_parser.h"
|
||||
#include "lzip_index.h"
|
||||
#include "archive_reader.h"
|
||||
#include "common_mutex.h"
|
||||
#include "decode.h"
|
||||
|
||||
/* When a problem is detected by any worker:
|
||||
|
@ -218,7 +218,7 @@ public:
|
|||
|
||||
bool reserve_name( const unsigned worker_id, const std::string & filename )
|
||||
{
|
||||
// compare the CRCs of the names, verify collisions comparing the names
|
||||
// compare the CRCs of the names; compare the names if the CRCs collide
|
||||
const unsigned crc =
|
||||
crc32c.compute_crc( (const uint8_t *)filename.c_str(), filename.size() );
|
||||
xlock( &mutex );
|
||||
|
@ -576,7 +576,7 @@ extern "C" void * dworker( void * arg )
|
|||
courier.collect_packet( i, worker_id, ar.e_msg(),
|
||||
( ret == 1 ) ? Packet::error1 : Packet::error2, ar.e_code() );
|
||||
goto done; }
|
||||
if( !verify_ustar_chksum( header ) ) // error or EOA
|
||||
if( !check_ustar_chksum( header ) ) // error or EOA
|
||||
{
|
||||
if( !courier.request_mastership( i, worker_id ) ) goto done;
|
||||
if( block_is_zero( header, header_size ) ) // EOA
|
||||
|
@ -758,6 +758,6 @@ int decode_lz( const Cl_options & cl_opts, const Archive_descriptor & ad,
|
|||
courier.ocheck_counter,
|
||||
courier.owait_counter );
|
||||
|
||||
if( !courier.finished() ) internal_error( "courier not finished." );
|
||||
if( !courier.finished() ) internal_error( conofin_msg );
|
||||
return final_exit_status( retval, cl_opts.program_mode != m_diff );
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue