From 763227aee4a3d86e718c3665fe5fa13055f67f03 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Fri, 8 Jul 2022 16:55:51 +0200 Subject: ipcpd: Refactor main functions The structure of main functions of the IPCPs was a bit strange with a ipcp_shutdown() call that combined waiting for a terminating signal with stopping the internal threads. This is now revised into a symmetrical design of ipcp_start(), which now includes the create response towards the IRMd. ipcp_sigwait(), which waits for a shutdown signal ipcp_stop() that then stops the internal threads. Now the main() functions of the IPCPs will make sense without checking what that ipcp_shutdown() functions actually does. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/ipcpd/ipcp.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/ipcpd/ipcp.h') diff --git a/src/ipcpd/ipcp.h b/src/ipcpd/ipcp.h index 79b7b7c0..5d1ae546 100644 --- a/src/ipcpd/ipcp.h +++ b/src/ipcpd/ipcp.h @@ -120,9 +120,11 @@ int ipcp_init(int argc, struct ipcp_ops * ops, enum ipcp_type type); -int ipcp_boot(void); +int ipcp_start(void); -void ipcp_shutdown(void); +void ipcp_sigwait(void); + +void ipcp_stop(void); void ipcp_fini(void); -- cgit v1.2.3