Phase 1+2: bug fixes and dead code cleanup
Phase 1 — Bugs: - receive_data: fix unsigned long long vs size_t mismatch - chunk_deserialize: add NULL check in multiprocessing.c and server.c - file_content_to_buffer: add missing fclose on error path - send_files_multithreaded: propagate sender thread result - server: add SIGPIPE handler - to_disk: check fwrite return value - scanner: use S_ISDIR instead of !S_ISREG - scanner: free cur_path before early return Phase 2 — Cleanup: - Remove unused chunk_decompress function - Remove unused array_list_clear function - Remove unused num_connections config field - Remove duplicate FILE_METADATA_WIRE_SIZE macro - Update tests for removed APIs
This commit is contained in:
@@ -86,7 +86,10 @@ static void test_chunk_compress_decompress_roundtrip() {
|
||||
Data *compressed = chunk_compress(chunk, 3, false);
|
||||
EXPECT_NOT_NULL(compressed);
|
||||
|
||||
Chunk *decompressed_chunk = chunk_decompress(compressed, false);
|
||||
Data *decompressed_data = data_decompress(compressed);
|
||||
EXPECT_NOT_NULL(decompressed_data);
|
||||
|
||||
Chunk *decompressed_chunk = chunk_deserialize(decompressed_data, false);
|
||||
EXPECT_NOT_NULL(decompressed_chunk);
|
||||
EXPECT_EQ_INT(decompressed_chunk->element_count, 2);
|
||||
|
||||
@@ -100,6 +103,7 @@ static void test_chunk_compress_decompress_roundtrip() {
|
||||
|
||||
chunk_destroy(chunk);
|
||||
data_destroy(compressed);
|
||||
data_destroy(decompressed_data);
|
||||
chunk_destroy(decompressed_chunk);
|
||||
|
||||
unlink(path1);
|
||||
|
||||
Reference in New Issue
Block a user