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
0a3b421e
Commit
0a3b421e
authored
Jul 13, 2011
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename delay_jitter to set_timeout.
parent
b2aa9f8c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
message.c
message.c
+5
-5
network.c
network.c
+3
-3
network.h
network.h
+1
-1
No files found.
message.c
View file @
0a3b421e
...
@@ -541,7 +541,7 @@ schedule_flush(struct network *net)
...
@@ -541,7 +541,7 @@ schedule_flush(struct network *net)
if
(
net
->
flush_timeout
.
tv_sec
!=
0
&&
if
(
net
->
flush_timeout
.
tv_sec
!=
0
&&
timeval_minus_msec
(
&
net
->
flush_timeout
,
&
now
)
<
msecs
)
timeval_minus_msec
(
&
net
->
flush_timeout
,
&
now
)
<
msecs
)
return
;
return
;
delay_jitter
(
&
net
->
flush_timeout
,
msecs
);
set_timeout
(
&
net
->
flush_timeout
,
msecs
);
}
}
static
void
static
void
...
@@ -552,7 +552,7 @@ schedule_flush_now(struct network *net)
...
@@ -552,7 +552,7 @@ schedule_flush_now(struct network *net)
if
(
net
->
flush_timeout
.
tv_sec
!=
0
&&
if
(
net
->
flush_timeout
.
tv_sec
!=
0
&&
timeval_minus_msec
(
&
net
->
flush_timeout
,
&
now
)
<
msecs
)
timeval_minus_msec
(
&
net
->
flush_timeout
,
&
now
)
<
msecs
)
return
;
return
;
delay_jitter
(
&
net
->
flush_timeout
,
msecs
);
set_timeout
(
&
net
->
flush_timeout
,
msecs
);
}
}
static
void
static
void
...
@@ -689,7 +689,7 @@ send_hello_noupdate(struct network *net, unsigned interval)
...
@@ -689,7 +689,7 @@ send_hello_noupdate(struct network *net, unsigned interval)
flushbuf
(
net
);
flushbuf
(
net
);
net
->
hello_seqno
=
seqno_plus
(
net
->
hello_seqno
,
1
);
net
->
hello_seqno
=
seqno_plus
(
net
->
hello_seqno
,
1
);
delay_jitter
(
&
net
->
hello_timeout
,
net
->
hello_interval
);
set_timeout
(
&
net
->
hello_timeout
,
net
->
hello_interval
);
if
(
!
net_up
(
net
))
if
(
!
net_up
(
net
))
return
;
return
;
...
@@ -1027,7 +1027,7 @@ schedule_update_flush(struct network *net, int urgent)
...
@@ -1027,7 +1027,7 @@ schedule_update_flush(struct network *net, int urgent)
if
(
net
->
update_flush_timeout
.
tv_sec
!=
0
&&
if
(
net
->
update_flush_timeout
.
tv_sec
!=
0
&&
timeval_minus_msec
(
&
net
->
update_flush_timeout
,
&
now
)
<
msecs
)
timeval_minus_msec
(
&
net
->
update_flush_timeout
,
&
now
)
<
msecs
)
return
;
return
;
delay_jitter
(
&
net
->
update_flush_timeout
,
msecs
);
set_timeout
(
&
net
->
update_flush_timeout
,
msecs
);
}
}
static
void
static
void
...
@@ -1105,7 +1105,7 @@ send_update(struct network *net, int urgent,
...
@@ -1105,7 +1105,7 @@ send_update(struct network *net, int urgent,
routes
[
i
].
src
->
plen
);
routes
[
i
].
src
->
plen
);
}
}
}
}
delay_jitter
(
&
net
->
update_timeout
,
net
->
update_interval
);
set_timeout
(
&
net
->
update_timeout
,
net
->
update_interval
);
}
}
schedule_update_flush
(
net
,
urgent
);
schedule_update_flush
(
net
,
urgent
);
}
}
...
...
network.c
View file @
0a3b421e
...
@@ -145,7 +145,7 @@ update_jitter(struct network *net, int urgent)
...
@@ -145,7 +145,7 @@ update_jitter(struct network *net, int urgent)
}
}
void
void
delay_jitter
(
struct
timeval
*
timeout
,
int
msecs
)
set_timeout
(
struct
timeval
*
timeout
,
int
msecs
)
{
{
timeval_add_msec
(
timeout
,
&
now
,
roughly
(
msecs
));
timeval_add_msec
(
timeout
,
&
now
,
roughly
(
msecs
));
}
}
...
@@ -359,8 +359,8 @@ network_up(struct network *net, int up)
...
@@ -359,8 +359,8 @@ network_up(struct network *net, int up)
memcpy
(
net
->
ll
,
ll
,
rc
*
16
);
memcpy
(
net
->
ll
,
ll
,
rc
*
16
);
}
}
}
}
delay_jitter
(
&
net
->
hello_timeout
,
net
->
hello_interval
);
set_timeout
(
&
net
->
hello_timeout
,
net
->
hello_interval
);
delay_jitter
(
&
net
->
update_timeout
,
net
->
update_interval
);
set_timeout
(
&
net
->
update_timeout
,
net
->
update_interval
);
send_hello
(
net
);
send_hello
(
net
);
send_request
(
net
,
NULL
,
0
);
send_request
(
net
,
NULL
,
0
);
}
else
{
}
else
{
...
...
network.h
View file @
0a3b421e
...
@@ -110,7 +110,7 @@ int network_idle(struct network *net);
...
@@ -110,7 +110,7 @@ int network_idle(struct network *net);
int
update_hello_interval
(
struct
network
*
net
);
int
update_hello_interval
(
struct
network
*
net
);
unsigned
jitter
(
struct
network
*
net
,
int
urgent
);
unsigned
jitter
(
struct
network
*
net
,
int
urgent
);
unsigned
update_jitter
(
struct
network
*
net
,
int
urgent
);
unsigned
update_jitter
(
struct
network
*
net
,
int
urgent
);
void
delay_jitter
(
struct
timeval
*
timeout
,
int
msecs
);
void
set_timeout
(
struct
timeval
*
timeout
,
int
msecs
);
int
network_up
(
struct
network
*
net
,
int
up
);
int
network_up
(
struct
network
*
net
,
int
up
);
int
network_ll_address
(
struct
network
*
net
,
const
unsigned
char
*
address
);
int
network_ll_address
(
struct
network
*
net
,
const
unsigned
char
*
address
);
void
check_networks
(
void
);
void
check_networks
(
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