From b65e5c1d45c8bfc38b3745cb28ac9074b1c1bdc1 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Fri, 23 Feb 2024 13:27:38 +0100 Subject: irmd: Always use reg_destroy_proc Destroying a process will now always be done with reg_destroy_proc, regardless of whether it was an IPCP or spawned. This makes it easier to keep the registry consistent and avoid races. Also improves some logs and updates some default settings. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/irmd/reg/tests/reg_test.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/irmd/reg/tests') diff --git a/src/irmd/reg/tests/reg_test.c b/src/irmd/reg/tests/reg_test.c index f840a3e0..c341c297 100644 --- a/src/irmd/reg/tests/reg_test.c +++ b/src/irmd/reg/tests/reg_test.c @@ -538,7 +538,7 @@ static int test_reg_create_ipcp(void) goto fail; } - if (reg_destroy_ipcp(info.pid) < 0) { + if (reg_destroy_proc(info.pid) < 0) { printf("Failed to destroy ipcp.\n"); goto fail; } @@ -605,7 +605,7 @@ static int test_set_layer(void) goto fail; } - if (reg_destroy_ipcp(info.pid) < 0) { + if (reg_destroy_proc(info.pid) < 0) { printf("Failed to destroy ipcp.\n"); goto fail; } @@ -771,7 +771,7 @@ static int test_reg_spawned(void) goto fail; } - if (reg_destroy_spawned(TEST_PID) < 0) { + if (reg_destroy_proc(TEST_PID) < 0) { printf("Failed to destroy spawned.\n"); goto fail; } @@ -1291,7 +1291,7 @@ static int test_wait_ipcp_boot_timeout(void) goto fail; } - if (reg_destroy_ipcp(info.pid) < 0) { + if (reg_destroy_proc(info.pid) < 0) { printf("Failed to destroy ipcp.\n"); goto fail; } @@ -1357,7 +1357,7 @@ static int test_wait_ipcp_boot_fail(void) pthread_join(thr, NULL); - if (reg_destroy_ipcp(info.pid) < 0) { + if (reg_destroy_proc(info.pid) < 0) { printf("Failed to destroy ipcp.\n"); goto fail; } @@ -1424,7 +1424,7 @@ static int test_wait_ipcp_boot_success(void) goto fail; } - if (reg_destroy_ipcp(info.pid) < 0) { + if (reg_destroy_proc(info.pid) < 0) { printf("Failed to destroy ipcp.\n"); goto fail; } -- cgit v1.2.3