Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3e4c571355 | |||
| 05dab758cf | |||
| 8cc587b79e |
+2
-1
@@ -126,7 +126,8 @@ void handler(int file_descriptor) {
|
|||||||
close(file_descriptor);
|
close(file_descriptor);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
PipelineContextReceiver* context = pipeline_context_receiver_create(config, q, file_descriptor, ssl);
|
PipelineContextReceiver* context =
|
||||||
|
pipeline_context_receiver_create(config, q, file_descriptor, ssl);
|
||||||
if (context == NULL) {
|
if (context == NULL) {
|
||||||
queue_destroy(q);
|
queue_destroy(q);
|
||||||
config_delete(config);
|
config_delete(config);
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ int receive_thread(void* pipeline_context) {
|
|||||||
}
|
}
|
||||||
char* full_path = path_cat(config->receive_root_directory, check_path);
|
char* full_path = path_cat(config->receive_root_directory, check_path);
|
||||||
struct stat st;
|
struct stat st;
|
||||||
bool has_old = full_path && stat(full_path, &st) == 0;
|
bool has_old = full_path && lstat(full_path, &st) == 0;
|
||||||
bool match = has_old && (unsigned long long)st.st_size == check_size &&
|
bool match = has_old && (unsigned long long)st.st_size == check_size &&
|
||||||
(long long)st.st_mtime == check_mtime;
|
(long long)st.st_mtime == check_mtime;
|
||||||
if (match)
|
if (match)
|
||||||
|
|||||||
@@ -116,7 +116,6 @@ static void test_receiver_fd_zero() {
|
|||||||
pipeline_context_receiver_destroy(ctx);
|
pipeline_context_receiver_destroy(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Test that receive_thread completes cleanly when sent FINISHED immediately */
|
/* Test that receive_thread completes cleanly when sent FINISHED immediately */
|
||||||
static void test_receive_thread_finished() {
|
static void test_receive_thread_finished() {
|
||||||
Config* cfg = config_create();
|
Config* cfg = config_create();
|
||||||
|
|||||||
Reference in New Issue
Block a user