summaryrefslogtreecommitdiff
path: root/src/ipcpd
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@ugent.be>2017-03-21 16:14:18 +0100
committerdimitri staessens <dimitri.staessens@ugent.be>2017-03-21 16:14:18 +0100
commit19a3277dbff7fc79c12be8a200ab6c8dfe6b50b9 (patch)
tree835d86fa8c9695e95ef213dc5644d1a7f1fdc395 /src/ipcpd
parent15b492ffb0de010b94bfb4e80c721e04ef6f63c2 (diff)
downloadouroboros-19a3277dbff7fc79c12be8a200ab6c8dfe6b50b9.tar.gz
ouroboros-19a3277dbff7fc79c12be8a200ab6c8dfe6b50b9.zip
irmd: Fix timeouts in reg_entry
This fixes bad timedwaits for the state of the reg_entry. Also slightly revised timedwaits throughout the prototype.
Diffstat (limited to 'src/ipcpd')
-rw-r--r--src/ipcpd/shim-data.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/ipcpd/shim-data.c b/src/ipcpd/shim-data.c
index 933f3a64..bec2486c 100644
--- a/src/ipcpd/shim-data.c
+++ b/src/ipcpd/shim-data.c
@@ -492,12 +492,10 @@ int shim_data_dir_query_wait(struct dir_query * query,
query->state = QUERY_PENDING;
- while (query->state == QUERY_PENDING) {
- if ((ret = -pthread_cond_timedwait(&query->cond,
- &query->lock,
- &abstime)) == -ETIMEDOUT)
- break;
- }
+ while (query->state == QUERY_PENDING && ret != -ETIMEDOUT)
+ ret = -pthread_cond_timedwait(&query->cond,
+ &query->lock,
+ &abstime);
if (query->state == QUERY_DESTROY)
ret = -1;