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
d59287f6
Commit
d59287f6
authored
Jun 17, 2007
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correct handling of silent_time.
parent
cfe4fa0d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
16 deletions
+12
-16
message.c
message.c
+12
-16
No files found.
message.c
View file @
d59287f6
...
@@ -472,25 +472,22 @@ send_update(struct destination *dest, struct network *net)
...
@@ -472,25 +472,22 @@ send_update(struct destination *dest, struct network *net)
{
{
int
i
;
int
i
;
if
(
net
)
{
if
(
parasitic
||
(
silent_time
&&
now
.
tv_sec
<
reboot_time
+
silent_time
))
{
net
->
update_time
=
now
.
tv_sec
;
if
(
dest
==
NULL
)
{
buffer_update
(
net
,
NULL
);
net
->
self_update_time
=
now
.
tv_sec
;
}
}
else
{
silent_time
=
0
;
}
}
if
(
net
==
NULL
)
{
if
(
net
==
NULL
)
{
for
(
i
=
0
;
i
<
numnets
;
i
++
)
for
(
i
=
0
;
i
<
numnets
;
i
++
)
send_update
(
dest
,
&
nets
[
i
]);
send_update
(
dest
,
&
nets
[
i
]);
return
;
return
;
}
}
if
(
parasitic
||
(
silent_time
&&
now
.
tv_sec
<
reboot_time
+
silent_time
))
{
net
->
update_time
=
now
.
tv_sec
;
if
(
dest
==
NULL
)
send_self_update
(
net
,
0
);
return
;
}
silent_time
=
0
;
if
(
dest
)
{
if
(
dest
)
{
if
(
updates
>=
net
->
bufsize
/
20
)
{
if
(
updates
>=
net
->
bufsize
/
20
)
{
/* Update won't fit in a single packet -- send a full dump. */
/* Update won't fit in a single packet -- send a full dump. */
...
@@ -507,9 +504,8 @@ send_update(struct destination *dest, struct network *net)
...
@@ -507,9 +504,8 @@ send_update(struct destination *dest, struct network *net)
for
(
i
=
0
;
i
<
numroutes
;
i
++
)
for
(
i
=
0
;
i
<
numroutes
;
i
++
)
if
(
routes
[
i
].
installed
)
if
(
routes
[
i
].
installed
)
buffer_update
(
net
,
routes
[
i
].
dest
);
buffer_update
(
net
,
routes
[
i
].
dest
);
buffer_update
(
net
,
NULL
);
net
->
update_time
=
now
.
tv_sec
;
net
->
update_time
=
now
.
tv_sec
;
net
->
self_update_time
=
now
.
tv_sec
;
send_self_update
(
net
,
0
)
;
}
}
schedule_update_flush
();
schedule_update_flush
();
}
}
...
@@ -532,8 +528,8 @@ send_self_update(struct network *net, int force_seqno)
...
@@ -532,8 +528,8 @@ send_self_update(struct network *net, int force_seqno)
debugf
(
"Sending self update to %s.
\n
"
,
net
->
ifname
);
debugf
(
"Sending self update to %s.
\n
"
,
net
->
ifname
);
buffer_update
(
net
,
NULL
);
buffer_update
(
net
,
NULL
);
schedule_update_flush
();
net
->
self_update_time
=
now
.
tv_sec
;
net
->
self_update_time
=
now
.
tv_sec
;
schedule_update_flush
();
}
}
void
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