diff options
author | dimitri staessens <[email protected]> | 2017-03-21 15:19:02 +0000 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2017-03-21 15:19:02 +0000 |
commit | b04b4933fc7f03aef940b4de5fd43815834951ca (patch) | |
tree | 835d86fa8c9695e95ef213dc5644d1a7f1fdc395 /src/ipcpd | |
parent | 15b492ffb0de010b94bfb4e80c721e04ef6f63c2 (diff) | |
parent | 19a3277dbff7fc79c12be8a200ab6c8dfe6b50b9 (diff) | |
download | ouroboros-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.c | 10 |
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; |