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. --- include/ouroboros/notifier.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include/ouroboros/notifier.h') diff --git a/include/ouroboros/notifier.h b/include/ouroboros/notifier.h index 7a70f95f..037d5daf 100644 --- a/include/ouroboros/notifier.h +++ b/include/ouroboros/notifier.h @@ -23,7 +23,8 @@ #ifndef OUROBOROS_LIB_NOTIFIER_H #define OUROBOROS_LIB_NOTIFIER_H -typedef void (* notifier_fn_t)(int event, +typedef void (* notifier_fn_t)(void * self, + int event, const void * o); int notifier_init(void); @@ -33,7 +34,8 @@ void notifier_fini(void); void notifier_event(int event, const void * o); -int notifier_reg(notifier_fn_t callback); +int notifier_reg(notifier_fn_t callback, + void * obj); void notifier_unreg(notifier_fn_t callback); -- cgit v1.2.3