summaryrefslogtreecommitdiffstats
path: root/decode_lz.cc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-09-21 06:58:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-09-21 06:58:44 +0000
commitdbbdc02b322480ee799107d2cfa317533008e6c8 (patch)
treea22c11b459ba27df42ea3427d8b48f7873110104 /decode_lz.cc
parentAdding upstream version 0.23. (diff)
downloadtarlz-80f0815e0d5a950b774a2a86b2d71bd40bcb135d.tar.xz
tarlz-80f0815e0d5a950b774a2a86b2d71bd40bcb135d.zip
Adding upstream version 0.24.upstream/0.24
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'decode_lz.cc')
-rw-r--r--decode_lz.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/decode_lz.cc b/decode_lz.cc
index 8780eab..15ac2a7 100644
--- a/decode_lz.cc
+++ b/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 );
}