summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@ugent.be>2017-08-23 07:27:04 +0000
committerSander Vrijders <sander.vrijders@ugent.be>2017-08-23 07:27:04 +0000
commit7fce287d421a90c67b62be6ee6210714b7427222 (patch)
tree242a3567137b204ee0f42184c0e2ccec7ad8d011
parent86523803ed5ca7092a9f8592dfc3b5476801b30f (diff)
parenta586eb1ab7699c2d0af7f4ef3de8039076c4c0f2 (diff)
downloadouroboros-7fce287d421a90c67b62be6ee6210714b7427222.tar.gz
ouroboros-7fce287d421a90c67b62be6ee6210714b7427222.zip
Merged in dstaesse/ouroboros/be-connmgr-fix (pull request #564)
ipcpd: Fix data race in connmgr
-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);