Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
babeld
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
babeld
Commits
8a5109b3
Commit
8a5109b3
authored
Mar 31, 2008
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename request_resend to resend.
parent
50148d3c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
15 deletions
+15
-15
babel.c
babel.c
+3
-3
resend.c
resend.c
+9
-9
resend.h
resend.h
+3
-3
No files found.
babel.c
View file @
8a5109b3
...
...
@@ -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
,
&
re
quest_re
send_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
,
&
re
quest_re
send_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
)
...
...
resend.c
View file @
8a5109b3
...
...
@@ -33,7 +33,7 @@ THE SOFTWARE.
#include "network.h"
#include "filter.h"
struct
timeval
re
quest_re
send_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
(
&
re
quest_re
send_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_re
quest_re
send_time
();
recompute_resend_time
();
return
1
;
}
...
...
@@ -184,11 +184,11 @@ expire_requests()
}
}
if
(
recompute
)
recompute_re
quest_re
send_time
();
recompute_resend_time
();
}
void
recompute_re
quest_re
send_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
(
&
re
quest_re
send_time
,
&
timeout
);
timeval_min
(
&
resend_time
,
&
timeout
);
}
request
=
request
->
next
;
}
re
quest_re
send_time
=
resend
;
resend_time
=
resend
;
}
void
resend_requests
()
do_resend
()
{
struct
request
*
request
;
...
...
@@ -224,5 +224,5 @@ resend_requests()
}
request
=
request
->
next
;
}
recompute_re
quest_re
send_time
();
recompute_resend_time
();
}
resend.h
View file @
8a5109b3
...
...
@@ -33,7 +33,7 @@ struct request {
struct
request
*
next
;
};
extern
struct
timeval
re
quest_re
send_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_re
quest_re
send_time
(
void
);
void
resend_requests
(
void
);
void
recompute_resend_time
(
void
);
void
do_resend
(
void
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment