diff options
Diffstat (limited to 'src/ipcpd/common')
-rw-r--r-- | src/ipcpd/common/connmgr.c | 3 | ||||
-rw-r--r-- | src/ipcpd/common/enroll.c | 15 |
2 files changed, 12 insertions, 6 deletions
diff --git a/src/ipcpd/common/connmgr.c b/src/ipcpd/common/connmgr.c index aa9f043e..eed6238e 100644 --- a/src/ipcpd/common/connmgr.c +++ b/src/ipcpd/common/connmgr.c @@ -489,9 +489,6 @@ int connmgr_alloc(enum comp_id id, switch (id) { case COMPID_DT: notifier_event(NOTIFY_DT_CONN_ADD, conn); -#if defined(BUILD_IPCP_UNICAST) && defined(IPCP_CONN_WAIT_DIR) - dir_wait_running(); -#endif break; case COMPID_MGMT: notifier_event(NOTIFY_MGMT_CONN_ADD, conn); diff --git a/src/ipcpd/common/enroll.c b/src/ipcpd/common/enroll.c index 3fc999af..4b437b27 100644 --- a/src/ipcpd/common/enroll.c +++ b/src/ipcpd/common/enroll.c @@ -43,6 +43,10 @@ #include <string.h> #include <pthread.h> +#ifdef __APPLE__ +#define llabs labs +#endif + #define ENROLL_COMP "Enrollment" #define ENROLL_PROTO "OEP" /* Ouroboros enrollment protocol */ #define ENROLL_WARN_TIME_OFFSET 20 @@ -60,6 +64,13 @@ struct { pthread_t listener; } enroll; +#ifdef DEBUG_PROTO_OEP + + +#endif + + + static void * enroll_handle(void * o) { struct enroll_req req; @@ -107,8 +118,6 @@ static void * enroll_handle(void * o) log_info_id(req.id, "Handling incoming enrollment."); - /* TODO: authentication, timezone handling (UTC). */ - ack.result = -100; clock_gettime(CLOCK_REALTIME, &resp.t); @@ -242,7 +251,7 @@ int enroll_boot(struct conn * conn, rtt.tv_sec = resp.t.tv_sec; rtt.tv_nsec = resp.t.tv_nsec; - if (labs(ts_diff_ms(&t0, &rtt)) - delta_t > ENROLL_WARN_TIME_OFFSET) + if (llabs(ts_diff_ms(&t0, &rtt)) - delta_t > ENROLL_WARN_TIME_OFFSET) log_warn_id(id, "Clock offset above threshold."); return 0; |