From 1dcef3957393c0500b81d93ffacf573e78be9a51 Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Tue, 19 Sep 2017 17:47:26 +0200 Subject: ipcpd: Enroll DHT when creating dt connection The DHT will now enroll or sync when a data transfer connection is added. This avoids the need to create a temporary data transfer connection during enrollment (and speeds it up considerably). The notifier system was modified to take an opaque pointer to the object that registers as a parameter. --- src/ipcpd/normal/dt.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/ipcpd/normal/dt.c') diff --git a/src/ipcpd/normal/dt.c b/src/ipcpd/normal/dt.c index 56cb5a61..2db0e7e2 100644 --- a/src/ipcpd/normal/dt.c +++ b/src/ipcpd/normal/dt.c @@ -67,11 +67,14 @@ struct { pthread_t listener; } dt; -static void handle_event(int event, +static void handle_event(void * self, + int event, const void * o) { struct conn * c; + (void) self; + c = (struct conn *) o; switch (event) { @@ -182,7 +185,7 @@ int dt_init(enum pol_routing pr, goto fail_pci_init; } - if (notifier_reg(handle_event)) { + if (notifier_reg(handle_event, NULL)) { log_err("Failed to register with notifier."); goto fail_notifier_reg; } -- cgit v1.2.3