diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-27 17:38:20 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-27 17:38:20 +0000 |
commit | a67cd9683ec4a7091a512be705eef105f989410d (patch) | |
tree | f3b54a9fd131c2bb76922eabe923b01a1cb99364 /srUtils.c | |
parent | 4b44a34d71b8b9bfc2574adeff4e735a8e97c876 (diff) | |
download | rsyslog-a67cd9683ec4a7091a512be705eef105f989410d.tar.gz rsyslog-a67cd9683ec4a7091a512be705eef105f989410d.tar.xz rsyslog-a67cd9683ec4a7091a512be705eef105f989410d.zip |
fixed queue termination in case bSaveOnShutdown is 0
Diffstat (limited to 'srUtils.c')
-rwxr-xr-x | srUtils.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -344,8 +344,17 @@ timeoutVal(struct timespec *pt) assert(pt != NULL); /* compute timeout */ clock_gettime(CLOCK_REALTIME, &t); - iTimeout = (pt->tv_nsec - t.tv_nsec) / 1000; +RUNLOG_VAR("%ld", pt->tv_sec); +RUNLOG_VAR("%ld", t.tv_sec); +RUNLOG_VAR("%ld", pt->tv_nsec); +RUNLOG_VAR("%ld", t.tv_nsec); + iTimeout = (pt->tv_nsec - t.tv_nsec) / 1000000; +RUNLOG_VAR("%ld", iTimeout); iTimeout += (pt->tv_sec - t.tv_sec) * 1000; +RUNLOG_VAR("%ld", iTimeout); + + if(iTimeout < 0) + iTimeout = 0; return iTimeout; } |