From 269f25d3bac5ab871d8044935eacc15cfeadeec6 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Sun, 12 Feb 2023 21:05:40 +0100 Subject: ipcpd: refactor IPCP configuration The ipcp configuration struct now has internal structures for the different IPCPs and for IPCP components of the unicast IPCP. Split the very long IPCP main loop into individual handler functions. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/ipcpd/local/main.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/ipcpd/local') diff --git a/src/ipcpd/local/main.c b/src/ipcpd/local/main.c index c1e95d23..f43d4713 100644 --- a/src/ipcpd/local/main.c +++ b/src/ipcpd/local/main.c @@ -145,11 +145,7 @@ static int ipcp_local_bootstrap(const struct ipcp_config * conf) assert(conf->type == THIS_TYPE); ipcpi.dir_hash_algo = conf->layer_info.dir_hash_algo; - ipcpi.layer_name = strdup(conf->layer_info.layer_name); - if (ipcpi.layer_name == NULL) { - log_err("Failed to set layer name"); - return -ENOMEM; - } + strcpy(ipcpi.layer_name,conf->layer_info.layer_name); ipcp_set_state(IPCP_OPERATIONAL); -- cgit v1.2.3