Commit 8a5109b3 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Rename request_resend to resend.

parent 50148d3c
......@@ -542,7 +542,7 @@ main(int argc, char **argv)
timeval_min_sec(&tv, expiry_time);
timeval_min_sec(&tv, source_expiry_time);
timeval_min_sec(&tv, kernel_dump_time);
timeval_min(&tv, &request_resend_time);
timeval_min(&tv, &resend_time);
for(i = 0; i < numnets; i++) {
if(!nets[i].up)
continue;
......@@ -669,8 +669,8 @@ main(int argc, char **argv)
}
}
if(timeval_compare(&now, &request_resend_time) >= 0)
resend_requests();
if(timeval_compare(&now, &resend_time) >= 0)
do_resend();
if(update_flush_timeout.tv_sec != 0) {
if(timeval_compare(&now, &update_flush_timeout) >= 0)
......
......@@ -33,7 +33,7 @@ THE SOFTWARE.
#include "network.h"
#include "filter.h"
struct timeval request_resend_time = {0, 0};
struct timeval resend_time = {0, 0};
struct request *recorded_requests = NULL;
static int
......@@ -109,7 +109,7 @@ record_request(const unsigned char *prefix, unsigned char plen,
if(request->resend) {
struct timeval timeout;
timeval_plus_msec(&timeout, &request->time, request->resend);
timeval_min(&request_resend_time, &timeout);
timeval_min(&resend_time, &timeout);
}
return 1;
}
......@@ -152,7 +152,7 @@ satisfy_request(const unsigned char *prefix, unsigned char plen,
else
previous->next = request->next;
free(request);
recompute_request_resend_time();
recompute_resend_time();
return 1;
}
......@@ -184,11 +184,11 @@ expire_requests()
}
}
if(recompute)
recompute_request_resend_time();
recompute_resend_time();
}
void
recompute_request_resend_time()
recompute_resend_time()
{
struct request *request;
struct timeval resend = {0, 0};
......@@ -198,16 +198,16 @@ recompute_request_resend_time()
if(request->resend) {
struct timeval timeout;
timeval_plus_msec(&timeout, &request->time, request->resend);
timeval_min(&request_resend_time, &timeout);
timeval_min(&resend_time, &timeout);
}
request = request->next;
}
request_resend_time = resend;
resend_time = resend;
}
void
resend_requests()
do_resend()
{
struct request *request;
......@@ -224,5 +224,5 @@ resend_requests()
}
request = request->next;
}
recompute_request_resend_time();
recompute_resend_time();
}
......@@ -33,7 +33,7 @@ struct request {
struct request *next;
};
extern struct timeval request_resend_time;
extern struct timeval resend_time;
struct request *find_request(const unsigned char *prefix, unsigned char plen,
struct request **previous_return);
......@@ -47,5 +47,5 @@ int satisfy_request(const unsigned char *prefix, unsigned char plen,
struct network *net);
void expire_requests(void);
void recompute_request_resend_time(void);
void resend_requests(void);
void recompute_resend_time(void);
void do_resend(void);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment