diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-25 19:57:42 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-25 19:57:42 +0000 |
commit | 3d26cfc1854cdae96b62b536983b1239b32e9ec2 (patch) | |
tree | 0acaa9ed6f2264d05e98b19e7cc50aebe94db041 /srUtils.c | |
parent | 800db596dbfd0c9a657609fd4a666ebf60f25594 (diff) | |
download | rsyslog-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-x | srUtils.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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... */ } |