From a5e450dd4528edc5a815ce57aa62273d25bb93a5 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Sat, 28 Jan 2006 21:59:54 +0000 Subject: For timeouts we use the time the request was last sent. --- daemon/snmp-engine.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'daemon/snmp-engine.c') 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) -- cgit v1.2.3