summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@ugent.be>2017-09-26 09:03:34 +0000
committerdimitri staessens <dimitri.staessens@ugent.be>2017-09-26 09:03:34 +0000
commit9c8d57ce793fff0b2c42c4cfc0d8ab97d554e1d8 (patch)
treeed355a38b79cd43aa4beb9b2435131132dddbeae
parenta44e8a5638c558abb9f17cdaaab3bb76bc5b2c5c (diff)
parent90900d36b7a380fee19b2171f4e49eed1eb35e8d (diff)
downloadouroboros-9c8d57ce793fff0b2c42c4cfc0d8ab97d554e1d8.tar.gz
ouroboros-9c8d57ce793fff0b2c42c4cfc0d8ab97d554e1d8.zip
Merged in sandervrijders/ouroboros/be-dht-fix (pull request #618)
ipcpd: normal: Set clock to realtime clock
-rw-r--r--src/ipcpd/normal/dht.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ipcpd/normal/dht.c b/src/ipcpd/normal/dht.c
index 4d0cdb02..b06c4480 100644
--- a/src/ipcpd/normal/dht.c
+++ b/src/ipcpd/normal/dht.c
@@ -2320,12 +2320,12 @@ static void * dht_handle_sdu(void * o)
struct cmd * cmd;
int ret = 0;
- clock_gettime(PTHREAD_COND_CLOCK, &dl);
+ clock_gettime(CLOCK_REALTIME_COARSE, &dl);
ts_add(&dl, &to, &dl);
pthread_mutex_lock(&dht->mtx);
- while(list_is_empty(&dht->cmds) && ret != -ETIMEDOUT)
+ while (list_is_empty(&dht->cmds) && ret != -ETIMEDOUT)
ret = -pthread_cond_timedwait(&dht->cond,
&dht->mtx, &dl);
@@ -2400,7 +2400,7 @@ static void * dht_handle_sdu(void * o)
"DHT enrolment refused.");
break;
- }
+ }
if (msg->t_refresh != KAD_T_REFR) {
log_warn("Refresh time mismatch. "