refactor: drop Config**, dead old-args plumbing, dedup constants, -Wformat-signedness
This commit is contained in:
@@ -3296,7 +3296,7 @@ int main(int argc, char* argv[]) {
|
||||
exit_code = 1;
|
||||
}
|
||||
} else if (config->use_multithreading) {
|
||||
exit_code = send_files_multithreaded(&config);
|
||||
exit_code = send_files_multithreaded(config);
|
||||
} else {
|
||||
exit_code = send_files(config);
|
||||
}
|
||||
|
||||
@@ -37,8 +37,6 @@
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define STREAM_THRESHOLD (64ULL * 1024 * 1024)
|
||||
|
||||
/* Aggregate loaded payload bytes the sender may buffer across the loader queue
|
||||
and the chunk in flight. Sending one chunk adds up to ~2 * MAX_CHUNK_SIZE of
|
||||
transient serialize/compress buffers on top of the queued payloads, so this
|
||||
@@ -1115,7 +1113,7 @@ static Client* connect_transfer_client(const Config* config) {
|
||||
return NULL;
|
||||
}
|
||||
return client_connect_ssh(config->ssh_destination, config->ssh_port,
|
||||
config->fastsync_server_path, config->old_args, config->rsh_command,
|
||||
config->fastsync_server_path, config->rsh_command,
|
||||
config->blocking_io, config->remote_options,
|
||||
config->remote_option_count);
|
||||
}
|
||||
@@ -3617,10 +3615,9 @@ send_fail:
|
||||
return ret;
|
||||
}
|
||||
|
||||
int send_files_multithreaded(Config** config_ptr) {
|
||||
if (!config_ptr || !*config_ptr)
|
||||
int send_files_multithreaded(Config* config) {
|
||||
if (!config)
|
||||
return 1;
|
||||
Config* config = *config_ptr;
|
||||
if (config->list_only)
|
||||
return send_list_only(config);
|
||||
if (config->dry_run)
|
||||
|
||||
@@ -22,7 +22,7 @@ void client_set_abort_armed(bool armed);
|
||||
* never free it, and the caller retains ownership (freeing it with
|
||||
* config_delete() once the call returns). */
|
||||
int send_files(Config* config);
|
||||
int send_files_multithreaded(Config** config);
|
||||
int send_files_multithreaded(Config* config);
|
||||
/* rsync's --ignore-errors deletion gate: with no I/O error during the scan the
|
||||
* deletion phase always proceeds; with one it is suppressed unless
|
||||
* `--ignore-errors` was given. Exposed so the decision can be unit-tested
|
||||
|
||||
Reference in New Issue
Block a user