summaryrefslogtreecommitdiff
path: root/src/ipcpd/shim-udp/main.c
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@ugent.be>2017-09-23 10:10:53 +0000
committerSander Vrijders <sander.vrijders@ugent.be>2017-09-23 10:10:53 +0000
commit3fac7e4d0a97f84c8d8a2ccac246abac399ff9fa (patch)
tree52cda24ec11092c2eb66cbe9e527bb49261bb2bd /src/ipcpd/shim-udp/main.c
parenta401e818c6064d423cda88c4d6b9c3f1914cb62a (diff)
parent17ab2b6d6bc95337d5fd54e058c0822260dbacf1 (diff)
downloadouroboros-3fac7e4d0a97f84c8d8a2ccac246abac399ff9fa.tar.gz
ouroboros-3fac7e4d0a97f84c8d8a2ccac246abac399ff9fa.zip
Merged in dstaesse/ouroboros/be-bugfixes (pull request #613)
Some bugfixes
Diffstat (limited to 'src/ipcpd/shim-udp/main.c')
-rw-r--r--src/ipcpd/shim-udp/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ipcpd/shim-udp/main.c b/src/ipcpd/shim-udp/main.c
index f47bb01a..d393dc4b 100644
--- a/src/ipcpd/shim-udp/main.c
+++ b/src/ipcpd/shim-udp/main.c
@@ -320,11 +320,12 @@ static int ipcp_udp_port_req(struct sockaddr_in * c_saddr,
udp_data.fd_to_uf[fd].udp = f_saddr.sin_port;
pthread_rwlock_unlock(&udp_data.flows_lock);
- pthread_mutex_unlock(&ipcpi.alloc_lock);
ipcpi.alloc_id = fd;
pthread_cond_broadcast(&ipcpi.alloc_cond);
+ 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));
@@ -345,7 +346,7 @@ static int udp_port_to_fd(int udp_port)
static int ipcp_udp_port_alloc_reply(uint16_t src_udp_port,
uint16_t dst_udp_port,
- int response)
+ int response)
{
int fd = -1;
int ret = 0;