summaryrefslogtreecommitdiff
path: root/src/lib/dev.c
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@intec.ugent.be>2016-10-05 13:13:39 +0200
committerdimitri staessens <dimitri.staessens@intec.ugent.be>2016-10-05 13:13:39 +0200
commit985d370f259c80c7f8b5c60070192745e7c70687 (patch)
treed90985e61884066204bf45091ff59a106d147fad /src/lib/dev.c
parent8a0bc74c2c7c3f5851b1a4dd51eb6ebbb0859a81 (diff)
parentc0a08d0f7a4b66a030eb0eca0e3f1dc45ff08665 (diff)
downloadouroboros-985d370f259c80c7f8b5c60070192745e7c70687.tar.gz
ouroboros-985d370f259c80c7f8b5c60070192745e7c70687.zip
Merged in sandervrijders/ouroboros/be-bugfix (pull request #253)
lib, ipcpd: Fix bad locking
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 178ee287..8e1ee342 100644
--- a/src/lib/dev.c
+++ b/src/lib/dev.c
@@ -889,11 +889,11 @@ int np1_flow_resp(pid_t n_api, int port_id)
int fd;
struct shm_ap_rbuff * rb;
+ port_wait_assign(&ai.ports[port_id]);
+
pthread_rwlock_rdlock(&ai.data_lock);
pthread_rwlock_wrlock(&ai.flows_lock);
- port_wait_assign(&ai.ports[port_id]);
-
fd = ai.ports[port_id].fd;
if (fd < 0) {
pthread_rwlock_unlock(&ai.flows_lock);