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, ...@@ -128,6 +128,17 @@ record_resend(int kind, const unsigned char *prefix, unsigned char plen,
return 1; 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 int
unsatisfied_request(const unsigned char *prefix, unsigned char plen, unsatisfied_request(const unsigned char *prefix, unsigned char plen,
unsigned short seqno, unsigned short router_hash) unsigned short seqno, unsigned short router_hash)
...@@ -172,17 +183,6 @@ satisfy_request(const unsigned char *prefix, unsigned char plen, ...@@ -172,17 +183,6 @@ satisfy_request(const unsigned char *prefix, unsigned char plen,
return 0; 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 void
expire_resend() 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