diff options
author | dimitri staessens <dimitri.staessens@ugent.be> | 2017-08-22 22:18:41 +0200 |
---|---|---|
committer | dimitri staessens <dimitri.staessens@ugent.be> | 2017-08-22 22:18:41 +0200 |
commit | a586eb1ab7699c2d0af7f4ef3de8039076c4c0f2 (patch) | |
tree | 242a3567137b204ee0f42184c0e2ccec7ad8d011 /src/ipcpd | |
parent | 86523803ed5ca7092a9f8592dfc3b5476801b30f (diff) | |
download | ouroboros-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')
-rw-r--r-- | src/ipcpd/normal/connmgr.c | 5 |
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); |