feat: protocol improvements (#100-#102, #106)
CI / lint (pull_request) Failing after 11s
CI / build-and-test (pull_request) Has been skipped
CI / sanitizers (address) (pull_request) Has been skipped
CI / sanitizers (undefined) (pull_request) Has been skipped
CI / fuzz-build (pull_request) Has been skipped
CI / coverage (pull_request) Has been skipped
CI / valgrind (pull_request) Has been skipped

This commit is contained in:
2026-07-21 16:47:09 +02:00
parent 86c1d159cb
commit 09dc449a5c
6 changed files with 12 additions and 16 deletions
+4 -4
View File
@@ -290,14 +290,14 @@ int main(int argc, char* argv[]) {
goto cleanup;
}
} else if (strcmp(argv[i], "--exclude-from") == 0 && i + 1 < argc) {
if (read_patterns_from_file(argv[++i], &config->exclude_patterns,
&config->exclude_count) != 0) {
if (read_patterns_from_file(argv[++i], &config->exclude_patterns, &config->exclude_count) !=
0) {
exit_code = 1;
goto cleanup;
}
} else if (strcmp(argv[i], "--include-from") == 0 && i + 1 < argc) {
if (read_patterns_from_file(argv[++i], &config->include_patterns,
&config->include_count) != 0) {
if (read_patterns_from_file(argv[++i], &config->include_patterns, &config->include_count) !=
0) {
exit_code = 1;
goto cleanup;
}
+1 -2
View File
@@ -37,8 +37,7 @@ DirectoryScanner* directory_scanner_create(char* root_directory, bool use_metada
unsigned long long chunk_size, char** exclude_patterns,
int exclude_count, char** include_patterns,
int include_count, unsigned long long max_size,
unsigned long long min_size,
int max_depth) {
unsigned long long min_size, int max_depth) {
DirectoryScanner* scanner = malloc(sizeof(DirectoryScanner));
if (scanner == NULL)
return NULL;
+1 -2
View File
@@ -26,8 +26,7 @@ DirectoryScanner* directory_scanner_create(char* root_directory, bool use_metada
unsigned long long chunk_size, char** exclude_patterns,
int exclude_count, char** include_patterns,
int include_count, unsigned long long max_size,
unsigned long long min_size,
int max_depth);
unsigned long long min_size, int max_depth);
Chunk* directory_scanner_next(DirectoryScanner* scanner);
void directory_scanner_destroy(DirectoryScanner* scanner);
+1 -2
View File
@@ -22,8 +22,7 @@ int receive_files(Config* config, int fd) {
return -1;
while (status == STATUS_NEXT || status == STATUS_CHUNK || status == STATUS_CHECK ||
status == STATUS_KEEPALIVE || status == STATUS_ABORT ||
status == STATUS_CHECK_BATCH) {
status == STATUS_KEEPALIVE || status == STATUS_ABORT || status == STATUS_CHECK_BATCH) {
if (status == STATUS_KEEPALIVE) {
send_status(fd, STATUS_KEEPALIVE);
goto next;
+1 -2
View File
@@ -106,8 +106,7 @@ int receive_thread(void* pipeline_context) {
if (!receive_status(file_descriptor, &status))
return thrd_error;
while (status == STATUS_NEXT || status == STATUS_CHUNK || status == STATUS_CHECK ||
status == STATUS_KEEPALIVE || status == STATUS_ABORT ||
status == STATUS_CHECK_BATCH) {
status == STATUS_KEEPALIVE || status == STATUS_ABORT || status == STATUS_CHECK_BATCH) {
if (status == STATUS_KEEPALIVE) {
send_status(file_descriptor, STATUS_KEEPALIVE);
goto next;