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
f98459d5
Commit
f98459d5
authored
Nov 02, 2008
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add network argument to flushupdates.
parent
d4e2b1a8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
17 deletions
+14
-17
babel.c
babel.c
+2
-2
message.c
message.c
+11
-14
message.h
message.h
+1
-1
No files found.
babel.c
View file @
f98459d5
...
...
@@ -514,7 +514,7 @@ main(int argc, char **argv)
send_wildcard_retraction
(
net
);
send_self_update
(
net
,
0
);
send_request
(
net
,
NULL
,
0
);
flushupdates
();
flushupdates
(
net
);
flushbuf
(
net
);
}
...
...
@@ -697,7 +697,7 @@ main(int argc, char **argv)
if
(
update_flush_timeout
.
tv_sec
!=
0
)
{
if
(
timeval_compare
(
&
now
,
&
update_flush_timeout
)
>=
0
)
flushupdates
();
flushupdates
(
NULL
);
}
if
(
unicast_flush_timeout
.
tv_sec
!=
0
)
{
...
...
message.c
View file @
f98459d5
...
...
@@ -455,8 +455,7 @@ flushbuf(struct network *net)
assert
(
net
->
buffered
<=
net
->
bufsize
);
if
(
update_net
==
net
)
flushupdates
();
flushupdates
(
net
);
if
(
net
->
buffered
>
0
)
{
debugf
(
" (flushing %d buffered bytes on %s)
\n
"
,
...
...
@@ -842,7 +841,7 @@ compare_buffered_updates(const void *av, const void *bv)
}
void
flushupdates
(
void
)
flushupdates
(
struct
network
*
network
)
{
struct
xroute
*
xroute
;
struct
route
*
route
;
...
...
@@ -850,6 +849,9 @@ flushupdates(void)
unsigned
char
last_plen
=
0xFF
;
int
i
;
if
(
network
&&
network
!=
update_net
)
return
;
if
(
updates
>
0
)
{
int
n
=
updates
;
struct
network
*
net
=
update_net
;
...
...
@@ -942,13 +944,12 @@ static void
buffer_update
(
struct
network
*
net
,
const
unsigned
char
*
prefix
,
unsigned
char
plen
)
{
if
(
update_net
&&
update_net
!=
net
)
flushupdates
();
flushupdates
(
net
);
update_net
=
net
;
if
(
updates
>=
MAX_BUFFERED_UPDATES
)
flushupdates
();
flushupdates
(
net
);
memcpy
(
buffered_updates
[
updates
].
prefix
,
prefix
,
16
);
buffered_updates
[
updates
].
plen
=
plen
;
updates
++
;
...
...
@@ -1185,8 +1186,7 @@ send_request(struct network *net,
}
/* make sure any buffered updates go out before this request. */
if
(
!
net
||
update_net
==
net
)
flushupdates
();
flushupdates
(
net
);
if
(
!
net
->
up
)
return
;
...
...
@@ -1215,8 +1215,7 @@ send_unicast_request(struct neighbour *neigh,
int
rc
,
v4
,
len
;
/* make sure any buffered updates go out before this request. */
if
(
update_net
==
neigh
->
network
)
flushupdates
();
flushupdates
(
neigh
->
network
);
debugf
(
"sending unicast request to %s for %s.
\n
"
,
format_address
(
neigh
->
address
),
...
...
@@ -1246,8 +1245,7 @@ send_multihop_request(struct network *net,
int
v4
,
pb
,
len
;
/* Make sure any buffered updates go out before this request. */
if
(
!
net
||
update_net
==
net
)
flushupdates
();
flushupdates
(
net
);
if
(
net
==
NULL
)
{
struct
network
*
n
;
...
...
@@ -1293,8 +1291,7 @@ send_unicast_multihop_request(struct neighbour *neigh,
int
rc
,
v4
,
pb
,
len
;
/* Make sure any buffered updates go out before this request. */
if
(
update_net
==
neigh
->
network
)
flushupdates
();
flushupdates
(
neigh
->
network
);
debugf
(
"Sending multi-hop request to %s for %s (%d hops).
\n
"
,
format_address
(
neigh
->
address
),
...
...
message.h
View file @
f98459d5
...
...
@@ -56,7 +56,7 @@ extern struct timeval unicast_flush_timeout;
void
parse_packet
(
const
unsigned
char
*
from
,
struct
network
*
net
,
const
unsigned
char
*
packet
,
int
packetlen
);
void
flushbuf
(
struct
network
*
net
);
void
flushupdates
(
void
);
void
flushupdates
(
struct
network
*
network
);
void
send_ack
(
struct
neighbour
*
neigh
,
unsigned
short
nonce
,
unsigned
short
interval
);
void
send_hello_noupdate
(
struct
network
*
net
,
unsigned
interval
);
...
...
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