diff options
| author | Stef Walter <stef@memberwebs.com> | 2006-01-28 21:59:54 +0000 | 
|---|---|---|
| committer | Stef Walter <stef@memberwebs.com> | 2006-01-28 21:59:54 +0000 | 
| commit | a5e450dd4528edc5a815ce57aa62273d25bb93a5 (patch) | |
| tree | ad9265ff3ee05186a4690b3bd2988f049ee9ca51 | |
| parent | 2f68afaa50abf604c101b7c9c0b4ebfeb2b5d57a (diff) | |
For timeouts we use the time the request was last sent.
| -rw-r--r-- | daemon/snmp-engine.c | 5 | 
1 files changed, 5 insertions, 0 deletions
| diff --git a/daemon/snmp-engine.c b/daemon/snmp-engine.c index 972ebf1..de814b3 100644 --- a/daemon/snmp-engine.c +++ b/daemon/snmp-engine.c @@ -99,6 +99,7 @@ typedef struct _rb_request      uint32_t id;      mstime next_retry;        /* Time of the next retry */ +    mstime last_sent;         /* Time last sent */      mstime interval;          /* How long between retries */      mstime timeout;           /* When this request times out */      uint sent;                /* How many times we've sent */ @@ -280,6 +281,7 @@ send_req(rb_request* req, mstime when)          req->next_retry = when + req->interval;      else          req->next_retry = 0; +    req->last_sent = when;  }  static void @@ -310,6 +312,9 @@ timeout_req(rb_request* req, mstime when)              incomplete = 1;      } +    /* For timeouts we use the time the last request was sent */ +    when = req->last_sent; +      free_req(req);      if(!incomplete) | 
