Commit 6d5ecf0e authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Move resend_expired around.

parent 0ceec83a
......@@ -128,6 +128,17 @@ record_resend(int kind, const unsigned char *prefix, unsigned char plen,
return 1;
}
static int
resend_expired(struct resend *resend)
{
switch(resend->kind) {
case RESEND_REQUEST:
return timeval_minus_msec(&now, &resend->time) >= REQUEST_TIMEOUT;
default:
return resend->max <= 0;
}
}
int
unsatisfied_request(const unsigned char *prefix, unsigned char plen,
unsigned short seqno, unsigned short router_hash)
......@@ -172,17 +183,6 @@ satisfy_request(const unsigned char *prefix, unsigned char plen,
return 0;
}
static int
resend_expired(struct resend *resend)
{
switch(resend->kind) {
case RESEND_REQUEST:
return timeval_minus_msec(&now, &resend->time) >= REQUEST_TIMEOUT;
default:
return resend->max <= 0;
}
}
void
expire_resend()
{
......
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