summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@ugent.be>2017-09-21 09:29:21 +0000
committerSander Vrijders <sander.vrijders@ugent.be>2017-09-21 09:29:21 +0000
commit6b6f82c8a58b2edbd029909be2ba1057c00cd6ed (patch)
tree2f1eeb781679c34ec9289dabb5710fbbc00771e5 /src
parentb66cf853efee91fcc43e2bbfcb1e39071b775d49 (diff)
parent1e3d0e5e869d6a920987d20cc6ed7a67f5c426bd (diff)
downloadouroboros-6b6f82c8a58b2edbd029909be2ba1057c00cd6ed.tar.gz
ouroboros-6b6f82c8a58b2edbd029909be2ba1057c00cd6ed.zip
Merged in dstaesse/ouroboros/be-rib (pull request #606)
lib: Pass the fuse struct to the handling thread
Diffstat (limited to 'src')
-rw-r--r--src/ipcpd/normal/dht.c2
-rw-r--r--src/lib/rib.c6
2 files changed, 3 insertions, 5 deletions
diff --git a/src/ipcpd/normal/dht.c b/src/ipcpd/normal/dht.c
index 996b122a..af1686a9 100644
--- a/src/ipcpd/normal/dht.c
+++ b/src/ipcpd/normal/dht.c
@@ -2240,7 +2240,7 @@ static void * dht_handle_sdu(void * o)
ipcp_sdb_release(sdb);
- free((struct sdu_info *) o);
+ free(o);
if (msg == NULL) {
log_err("Failed to unpack message.");
diff --git a/src/lib/rib.c b/src/lib/rib.c
index 579d9aac..dc78696b 100644
--- a/src/lib/rib.c
+++ b/src/lib/rib.c
@@ -227,9 +227,7 @@ static struct fuse_operations r_ops = {
static void * fuse_thr(void * o)
{
- (void) o;
-
- if (fuse_loop(rib.fuse) < 0)
+ if (fuse_loop((struct fuse *) o) < 0)
return (void *) -1;
return (void *) 0;
@@ -276,7 +274,7 @@ int rib_init(const char * prefix)
if (pthread_rwlock_init(&rib.lock, NULL))
goto fail_rwlock_init;
- if (pthread_create(&rib.fuse_thr, NULL, fuse_thr, NULL))
+ if (pthread_create(&rib.fuse_thr, NULL, fuse_thr, rib.fuse))
goto fail_fuse_thr;
fuse_opt_free_args(&args);