summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/fmgr.c
diff options
context:
space:
mode:
authorSander Vrijders <[email protected]>2017-04-05 12:41:49 +0000
committerdimitri staessens <[email protected]>2017-04-05 12:41:49 +0000
commit901a97a2a51ece0fd9991797b9764f60268962b3 (patch)
treee60083545da6ce0dc5fdacd06610d907b90c5aee /src/ipcpd/normal/fmgr.c
parent10195b445b6788c60dfd851e3095fdfcb903e574 (diff)
parentc5b092665c219c679ede91b3dc816c61f2f9dabe (diff)
downloadouroboros-901a97a2a51ece0fd9991797b9764f60268962b3.tar.gz
ouroboros-901a97a2a51ece0fd9991797b9764f60268962b3.zip
Merged in sandervrijders/ouroboros/be-fix-llc (pull request #462)
Be fix llc
Diffstat (limited to 'src/ipcpd/normal/fmgr.c')
-rw-r--r--src/ipcpd/normal/fmgr.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ipcpd/normal/fmgr.c b/src/ipcpd/normal/fmgr.c
index 19653430..56f1e099 100644
--- a/src/ipcpd/normal/fmgr.c
+++ b/src/ipcpd/normal/fmgr.c
@@ -619,10 +619,12 @@ int fmgr_np1_post_buf(cep_id_t cep_id,
switch (msg->code) {
case FLOW_ALLOC_CODE__FLOW_REQ:
+ pthread_mutex_lock(&ipcpi.alloc_lock);
fd = ipcp_flow_req_arr(getpid(),
msg->dst_name,
msg->qoscube);
if (fd < 0) {
+ pthread_mutex_unlock(&ipcpi.alloc_lock);
flow_alloc_msg__free_unpacked(msg, NULL);
log_err("Failed to get fd for flow.");
return -1;
@@ -634,6 +636,7 @@ int fmgr_np1_post_buf(cep_id_t cep_id,
fmgr.np1_cep_id_to_fd[cep_id] = fd;
pthread_rwlock_unlock(&fmgr.np1_flows_lock);
+ pthread_mutex_unlock(&ipcpi.alloc_lock);
break;
case FLOW_ALLOC_CODE__FLOW_REPLY: