summaryrefslogtreecommitdiff
path: root/src/ipcpd
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@ugent.be>2017-03-21 15:19:02 +0000
committerSander Vrijders <sander.vrijders@ugent.be>2017-03-21 15:19:02 +0000
commitb04b4933fc7f03aef940b4de5fd43815834951ca (patch)
tree835d86fa8c9695e95ef213dc5644d1a7f1fdc395 /src/ipcpd
parent15b492ffb0de010b94bfb4e80c721e04ef6f63c2 (diff)
parent19a3277dbff7fc79c12be8a200ab6c8dfe6b50b9 (diff)
downloadouroboros-b04b4933fc7f03aef940b4de5fd43815834951ca.tar.gz
ouroboros-b04b4933fc7f03aef940b4de5fd43815834951ca.zip
Merged in dstaesse/ouroboros/testing-waits (pull request #407)
irmd: Fix timeouts in reg_entry
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;