cleanup: remove dead code, fix bugs, refactor SSH dest parsing
- Remove debug printf calls from file.c - Remove dead code: chunk_print, chunk_format, chunk_data_create/delete - Remove unused config.use_single_send_per_file field - Fix server_delete() no-op (double-pointer) - Fix double cast (long)(long) -> ptrdiff_t in chunk.c - Fix thread return value: thrd_error instead of 1 - Remove unused config param from receive_chunk_enqueue() - Make queue_double_capacity() static - Move SSH dest parsing into config.c as config_parse_ssh_dest() - Fix test_config_ssh_dest to test parsing round-trip - Remove chunk_format test (obsolete format) - Replace chunk_data_delete with data_destroy in tests
This commit is contained in:
@@ -80,7 +80,6 @@ void file_load_data(File *file) {
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
printf("%ld is file big", file->data->size);
|
||||
size_t bytes_read = file_content_to_buffer(file);
|
||||
if (bytes_read != file->data->size) {
|
||||
log_message(STATUS_ERROR, "Didnt read expected amount of bytes from file");
|
||||
@@ -88,12 +87,6 @@ void file_load_data(File *file) {
|
||||
}
|
||||
}
|
||||
|
||||
void file_print(void *item) {
|
||||
if (item == NULL)
|
||||
return;
|
||||
printf("%s\n", ((File *)item)->path);
|
||||
}
|
||||
|
||||
static void metadata_send(int file_descriptor, FileMetadata *m) {
|
||||
if (m == NULL) {
|
||||
int zero = 0;
|
||||
@@ -127,7 +120,6 @@ void file_send_single_calls(File *file, int file_descriptor, bool use_metadata)
|
||||
send_str(file_descriptor, file->path);
|
||||
if (use_metadata)
|
||||
metadata_send(file_descriptor, file->metadata);
|
||||
printf("Sending File: %ld", file->data->size);
|
||||
send_data(file_descriptor, file->data->data, file->data->size);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user