From 1856a585ae4290e666314ee7907dc8cbbb08fe2d Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Thu, 17 Jul 2025 21:32:12 +0200 Subject: ipcpd: Refactor ipcp main struct The ipcpi (IPCP instance) is now cleanly tucked away within its source file instead of exposed all over the place. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/ipcpd/common/enroll.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/ipcpd/common') diff --git a/src/ipcpd/common/enroll.c b/src/ipcpd/common/enroll.c index 5e35ce37..3fc999af 100644 --- a/src/ipcpd/common/enroll.c +++ b/src/ipcpd/common/enroll.c @@ -227,12 +227,14 @@ int enroll_boot(struct conn * conn, return -1; } - if (resp.conf.type != ipcpi.type) { + if (resp.conf.type != ipcp_get_type()) { log_err_id(id, "Wrong type in enrollment response %d (%d).", - resp.conf.type, ipcpi.type); + resp.conf.type, ipcp_get_type()); return -1; } + enroll.conf = resp.conf; + clock_gettime(CLOCK_REALTIME, &rtt); delta_t = ts_diff_ms(&t0, &rtt); @@ -243,8 +245,6 @@ int enroll_boot(struct conn * conn, if (labs(ts_diff_ms(&t0, &rtt)) - delta_t > ENROLL_WARN_TIME_OFFSET) log_warn_id(id, "Clock offset above threshold."); - enroll.conf = resp.conf; - return 0; } -- cgit v1.2.3