diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2007-07-23 06:21:16 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2007-07-23 06:21:16 +0000 |
commit | 8425445c2dd68d91bb62487032151f06d35c583a (patch) | |
tree | 92ef23fb997666d1b09ed65bb788c52dffc1c925 /omfwd.c | |
parent | 6b24fa20d4da8a57a2e34b1ca0c3159b93157e1e (diff) | |
download | rsyslog-8425445c2dd68d91bb62487032151f06d35c583a.tar.gz rsyslog-8425445c2dd68d91bb62487032151f06d35c583a.tar.xz rsyslog-8425445c2dd68d91bb62487032151f06d35c583a.zip |
simplified action calling using new interface Warning: this version has a
structure alignment issue in omusrmsg.c, I currently do not know why. I
check in so that others can look at it.
Diffstat (limited to 'omfwd.c')
-rw-r--r-- | omfwd.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -63,7 +63,7 @@ static const char *sys_h_errlist[] = { /* call the shell action * returns 0 if it succeeds, something else otherwise */ -int doActionFwd(selector_t *f, time_t now) +int doActionFwd(selector_t *f) { char *psz; /* temporary buffering */ register unsigned l; @@ -78,7 +78,7 @@ int doActionFwd(selector_t *f, time_t now) switch (f->f_type) { case F_FORW_SUSP: - fwd_suspend = time(NULL) - f->f_time; + fwd_suspend = time(NULL) - f->f_un.f_forw.ttSuspend; if ( fwd_suspend >= INET_SUSPEND_TIME ) { dprintf("\nForwarding suspension over, retrying FORW "); f->f_type = F_FORW; @@ -101,7 +101,7 @@ int doActionFwd(selector_t *f, time_t now) case F_FORW_UNKN: /* The remote address is not yet known and needs to be obtained */ dprintf(" %s\n", f->f_un.f_forw.f_hname); - fwd_suspend = time(NULL) - f->f_time; + fwd_suspend = time(NULL) - f->f_un.f_forw.ttSuspend; if(fwd_suspend >= INET_SUSPEND_TIME) { dprintf("Forwarding suspension to unknown over, retrying\n"); memset(&hints, 0, sizeof(hints)); @@ -144,7 +144,7 @@ int doActionFwd(selector_t *f, time_t now) if ( strcmp(getHOSTNAME(f->f_pMsg), LocalHostName) && NoHops ) dprintf("Not sending message to remote.\n"); else { - f->f_time = now; + f->f_un.f_forw.ttSuspend = time(NULL); psz = iovAsString(f); l = f->f_iLenpsziov; if (l > MAXLINE) |