summaryrefslogtreecommitdiff
path: root/src/lib/dev.c
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@intec.ugent.be>2016-08-09 16:06:12 +0200
committerdimitri staessens <dimitri.staessens@intec.ugent.be>2016-08-09 16:06:12 +0200
commit9dce327e10bffddc9dc5058f06407e8ff12389b7 (patch)
tree97c4672e8e912efbbaf1a4e1cf3077a0cfe402b4 /src/lib/dev.c
parent067c5661859f6a1f75adb0bb325d1641fed221a1 (diff)
downloadouroboros-9dce327e10bffddc9dc5058f06407e8ff12389b7.tar.gz
ouroboros-9dce327e10bffddc9dc5058f06407e8ff12389b7.zip
lib: Various fixes
Fix missing set of api upon flow_alloc. Various locking fixes.
Diffstat (limited to 'src/lib/dev.c')
-rw-r--r--src/lib/dev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/dev.c b/src/lib/dev.c
index 6f0de8c8..3c31ce6d 100644
--- a/src/lib/dev.c
+++ b/src/lib/dev.c
@@ -203,6 +203,7 @@ int flow_accept(char ** ae_name)
_ap_instance->flows[cfd].port_id = recv_msg->port_id;
_ap_instance->flows[cfd].oflags = FLOW_O_DEFAULT;
+ _ap_instance->flows[cfd].api = recv_msg->api;
pthread_rwlock_unlock(&_ap_instance->flows_lock);
pthread_rwlock_unlock(&_ap_instance->data_lock);
@@ -321,8 +322,7 @@ int flow_alloc(char * dst_name,
_ap_instance->flows[fd].port_id = recv_msg->port_id;
_ap_instance->flows[fd].oflags = FLOW_O_DEFAULT;
- _ap_instance->flows[fd].api =
- shm_ap_rbuff_get_api(_ap_instance->flows[fd].rb);
+ _ap_instance->flows[fd].api = recv_msg->api;
pthread_rwlock_unlock(&_ap_instance->flows_lock);
pthread_rwlock_unlock(&_ap_instance->data_lock);