diff options
author | Sander Vrijders <sander.vrijders@ugent.be> | 2017-04-05 12:41:49 +0000 |
---|---|---|
committer | dimitri staessens <dimitri.staessens@ugent.be> | 2017-04-05 12:41:49 +0000 |
commit | 901a97a2a51ece0fd9991797b9764f60268962b3 (patch) | |
tree | e60083545da6ce0dc5fdacd06610d907b90c5aee /src/ipcpd/shim-udp | |
parent | 10195b445b6788c60dfd851e3095fdfcb903e574 (diff) | |
parent | c5b092665c219c679ede91b3dc816c61f2f9dabe (diff) | |
download | ouroboros-901a97a2a51ece0fd9991797b9764f60268962b3.tar.gz ouroboros-901a97a2a51ece0fd9991797b9764f60268962b3.zip |
Merged in sandervrijders/ouroboros/be-fix-llc (pull request #462)
Be fix llc
Diffstat (limited to 'src/ipcpd/shim-udp')
-rw-r--r-- | src/ipcpd/shim-udp/main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ipcpd/shim-udp/main.c b/src/ipcpd/shim-udp/main.c index 71f1270b..ea3d1f88 100644 --- a/src/ipcpd/shim-udp/main.c +++ b/src/ipcpd/shim-udp/main.c @@ -269,9 +269,12 @@ static int ipcp_udp_port_req(struct sockaddr_in * c_saddr, return -1; } + pthread_mutex_lock(&ipcpi.alloc_lock); + /* reply to IRM */ fd = ipcp_flow_req_arr(getpid(), dst_name, cube); if (fd < 0) { + pthread_mutex_unlock(&ipcpi.alloc_lock); log_err("Could not get new flow from IRMd."); close(skfd); return -1; @@ -286,6 +289,7 @@ static int ipcp_udp_port_req(struct sockaddr_in * c_saddr, pthread_rwlock_unlock(&udp_data.flows_lock); pthread_rwlock_unlock(&ipcpi.state_lock); + pthread_mutex_unlock(&ipcpi.alloc_lock); log_dbg("Pending allocation request, fd %d, UDP port (%d, %d).", fd, ntohs(f_saddr.sin_port), ntohs(c_saddr->sin_port)); |