Mercurial > hg > freeDiameter
changeset 1116:5da2ea1585a1
Merge
author | Sebastien Decugis <sdecugis@freediameter.net> |
---|---|
date | Mon, 13 May 2013 19:18:09 +0800 |
parents | eb4ce68b6e5c (current diff) a325f95de659 (diff) |
children | caae38f15dfe |
files | |
diffstat | 2 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/tools/org_to_fd.pl Mon May 13 19:17:13 2013 +0800 +++ b/contrib/tools/org_to_fd.pl Mon May 13 19:18:09 2013 +0800 @@ -52,7 +52,7 @@ } sub usage($) { - die("usage: org_to_fd.pl [-V vendor_name -v vendor] [file ...]\n"); + die("usage: org_to_fd.pl [-V vendor_name -v vendor_code] [file ...]\n"); exit(@_); }
--- a/extensions/rt_busypeers/rtbusy.c Mon May 13 19:17:13 2013 +0800 +++ b/extensions/rt_busypeers/rtbusy.c Mon May 13 19:18:09 2013 +0800 @@ -106,8 +106,11 @@ } /* Send the query again. We need to re-associate the expirecb which was cleaned, if it is used */ if (rtbusy_conf.RelayTimeout) { - struct timespec tm = { .tv_sec = rtbusy_conf.RelayTimeout/1000, .tv_nsec=1000000LL * (rtbusy_conf.RelayTimeout % 1000) }; - CHECK_FCT( fd_msg_send_timeout( pmsg, NULL, NULL, rtbusy_expirecb, &tm ) ); + struct timespec expire; + CHECK_SYS( clock_gettime(CLOCK_REALTIME, &expire) ); + expire.tv_sec += rtbusy_conf.RelayTimeout/1000 + ((expire.tv_nsec + (1000000LL * (rtbusy_conf.RelayTimeout % 1000))) / 1000000000LL); + expire.tv_nsec = (expire.tv_nsec + (1000000LL * (rtbusy_conf.RelayTimeout % 1000))) % 1000000000LL; + CHECK_FCT( fd_msg_send_timeout( pmsg, NULL, NULL, rtbusy_expirecb, &expire ) ); } else { CHECK_FCT( fd_msg_send(pmsg, NULL, NULL) ); }