summaryrefslogtreecommitdiffstats
path: root/srUtils.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-01-25 19:57:42 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-01-25 19:57:42 +0000
commit3d26cfc1854cdae96b62b536983b1239b32e9ec2 (patch)
tree0acaa9ed6f2264d05e98b19e7cc50aebe94db041 /srUtils.c
parent800db596dbfd0c9a657609fd4a666ebf60f25594 (diff)
downloadrsyslog-3d26cfc1854cdae96b62b536983b1239b32e9ec2.tar.gz
rsyslog-3d26cfc1854cdae96b62b536983b1239b32e9ec2.tar.xz
rsyslog-3d26cfc1854cdae96b62b536983b1239b32e9ec2.zip
fixed worker timeout which was accidently not set (and thus 0)
Diffstat (limited to 'srUtils.c')
-rwxr-xr-xsrUtils.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/srUtils.c b/srUtils.c
index efcd7e6d..3d30f5a2 100755
--- a/srUtils.c
+++ b/srUtils.c
@@ -321,12 +321,16 @@ timeoutComp(struct timespec *pt, long iTimeout)
assert(pt != NULL);
/* compute timeout */
clock_gettime(CLOCK_REALTIME, pt);
+RUNLOG_VAR("%ld", pt->tv_nsec);
pt->tv_nsec += (iTimeout % 1000) * 1000000; /* think INTEGER arithmetic! */
+RUNLOG_VAR("%ld", pt->tv_nsec);
if(pt->tv_nsec > 999999999) { /* overrun? */
+RUNLOG;
pt->tv_nsec -= 1000000000;
- ++pt->tv_sec;
}
+RUNLOG_VAR("%ld", pt->tv_sec);
pt->tv_sec += iTimeout / 1000;
+RUNLOG_VAR("%ld", pt->tv_sec);
return RS_RET_OK; /* so far, this is static... */
}