Merge remote-tracking branch 'origin/feat/whole-file' into dev
# Conflicts: # tests/test_client_cli.c # tests/test_config.c
This commit is contained in:
+2
-1
@@ -36,6 +36,7 @@ static void config_set_defaults(Config* config) {
|
||||
config->min_size = 0;
|
||||
config->use_incremental = false;
|
||||
config->use_delta = false;
|
||||
config->whole_file = false;
|
||||
config->delta_block_size = DELTA_BLOCK_SIZE_DEFAULT;
|
||||
config->delta_max_file_size = DELTA_MAX_FILE_SIZE;
|
||||
config->use_tls = false;
|
||||
@@ -234,7 +235,7 @@ static bool send_core_fields(int fd, const Config* c) {
|
||||
|
||||
static bool send_delta_fields(int fd, const Config* c) {
|
||||
return send_int(fd, c->use_delete) && send_int(fd, c->use_incremental) &&
|
||||
send_int(fd, c->use_delta) &&
|
||||
send_int(fd, c->use_delta && !c->whole_file) &&
|
||||
send_n_data(fd, &c->delta_block_size, sizeof(c->delta_block_size)) &&
|
||||
send_n_data(fd, &c->delta_max_file_size, sizeof(unsigned long long));
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ typedef struct Config {
|
||||
unsigned long long min_size;
|
||||
bool use_incremental;
|
||||
bool use_delta;
|
||||
bool whole_file;
|
||||
uint32_t delta_block_size;
|
||||
unsigned long long delta_max_file_size;
|
||||
bool use_tls;
|
||||
|
||||
@@ -403,7 +403,7 @@ File* receive_incremental_check(int fd, const Config* config, bool* skipped) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool try_delta = config->use_delta && has_old_file && old_data != NULL &&
|
||||
bool try_delta = config->use_delta && !config->whole_file && has_old_file && old_data != NULL &&
|
||||
delta_should_attempt(old_size, check_size, config->delta_max_file_size);
|
||||
|
||||
if (try_delta) {
|
||||
|
||||
Reference in New Issue
Block a user