summaryrefslogtreecommitdiff
path: root/daemon/snmp-engine.c
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2006-01-28 21:59:54 +0000
committerStef Walter <stef@memberwebs.com>2006-01-28 21:59:54 +0000
commita5e450dd4528edc5a815ce57aa62273d25bb93a5 (patch)
treead9265ff3ee05186a4690b3bd2988f049ee9ca51 /daemon/snmp-engine.c
parent2f68afaa50abf604c101b7c9c0b4ebfeb2b5d57a (diff)
For timeouts we use the time the request was last sent.
Diffstat (limited to 'daemon/snmp-engine.c')
-rw-r--r--daemon/snmp-engine.c5
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)