summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@ugent.be>2017-09-19 17:47:26 +0200
committerdimitri staessens <dimitri.staessens@ugent.be>2017-09-19 18:46:13 +0200
commit1dcef3957393c0500b81d93ffacf573e78be9a51 (patch)
treecf29abf695c1d53251560433441c29af57333e4b /include
parent115431af51795dfd583e24a051a7749c58a900b3 (diff)
downloadouroboros-1dcef3957393c0500b81d93ffacf573e78be9a51.tar.gz
ouroboros-1dcef3957393c0500b81d93ffacf573e78be9a51.zip
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.
Diffstat (limited to 'include')
-rw-r--r--include/ouroboros/notifier.h6
1 files changed, 4 insertions, 2 deletions
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);