summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@ugent.be>2017-08-22 22:18:41 +0200
committerdimitri staessens <dimitri.staessens@ugent.be>2017-08-22 22:18:41 +0200
commita586eb1ab7699c2d0af7f4ef3de8039076c4c0f2 (patch)
tree242a3567137b204ee0f42184c0e2ccec7ad8d011 /src/ipcpd/normal
parent86523803ed5ca7092a9f8592dfc3b5476801b30f (diff)
downloadouroboros-a586eb1ab7699c2d0af7f4ef3de8039076c4c0f2.tar.gz
ouroboros-a586eb1ab7699c2d0af7f4ef3de8039076c4c0f2.zip
ipcpd: Fix data race in connmgr
The removal of the mutex and signal in 198b709 was a mistake.
Diffstat (limited to 'src/ipcpd/normal')
-rw-r--r--src/ipcpd/normal/connmgr.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ipcpd/normal/connmgr.c b/src/ipcpd/normal/connmgr.c
index b7ba90d9..a83d71c3 100644
--- a/src/ipcpd/normal/connmgr.c
+++ b/src/ipcpd/normal/connmgr.c
@@ -120,7 +120,12 @@ static int add_ae_conn(const char * name,
return -1;
}
+ pthread_mutex_lock(&ae->conn_lock);
+
list_add(&ae_conn->next, &ae->conn_list);
+ pthread_cond_signal(&ae->conn_cond);
+
+ pthread_mutex_unlock(&ae->conn_lock);
pthread_rwlock_unlock(&connmgr.aes_lock);