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
c4e6bf0e
Commit
c4e6bf0e
authored
Oct 19, 2008
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sundry time values be unsigned.
parent
7e04f06d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
14 deletions
+12
-14
message.c
message.c
+4
-6
neighbour.c
neighbour.c
+4
-4
network.c
network.c
+2
-2
network.h
network.h
+2
-2
No files found.
message.c
View file @
c4e6bf0e
...
...
@@ -491,7 +491,7 @@ flushbuf(struct network *net)
static
void
schedule_flush
(
struct
network
*
net
)
{
int
msecs
=
jitter
(
net
,
0
);
unsigned
msecs
=
jitter
(
net
,
0
);
if
(
net
->
flush_timeout
.
tv_sec
!=
0
&&
timeval_minus_msec
(
&
net
->
flush_timeout
,
&
now
)
<
msecs
)
return
;
...
...
@@ -504,7 +504,7 @@ static void
schedule_flush_now
(
struct
network
*
net
)
{
/* Almost now */
int
msecs
=
roughly
(
10
);
unsigned
msecs
=
roughly
(
10
);
if
(
net
->
flush_timeout
.
tv_sec
!=
0
&&
timeval_minus_msec
(
&
net
->
flush_timeout
,
&
now
)
<
msecs
)
return
;
...
...
@@ -514,12 +514,10 @@ schedule_flush_now(struct network *net)
}
static
void
schedule_unicast_flush
(
int
msecs
)
schedule_unicast_flush
(
unsigned
msecs
)
{
if
(
!
unicast_neighbour
)
return
;
if
(
msecs
<
0
)
msecs
=
jitter
(
unicast_neighbour
->
network
,
1
);
if
(
unicast_flush_timeout
.
tv_sec
!=
0
&&
timeval_minus_msec
(
&
unicast_flush_timeout
,
&
now
)
<
msecs
)
return
;
...
...
@@ -926,7 +924,7 @@ flushupdates(void)
static
void
schedule_update_flush
(
struct
network
*
net
,
int
urgent
)
{
int
msecs
;
unsigned
msecs
;
msecs
=
update_jitter
(
net
,
urgent
);
if
(
update_flush_timeout
.
tv_sec
!=
0
&&
timeval_minus_msec
(
&
update_flush_timeout
,
&
now
)
<
msecs
)
...
...
neighbour.c
View file @
c4e6bf0e
...
...
@@ -198,7 +198,7 @@ update_neighbour(struct neighbour *neigh, int hello, int hello_interval)
static
int
reset_txcost
(
struct
neighbour
*
neigh
)
{
int
delay
;
unsigned
delay
;
delay
=
timeval_minus_msec
(
&
now
,
&
neigh
->
ihu_time
);
...
...
@@ -228,8 +228,8 @@ unsigned
check_neighbours
()
{
struct
neighbour
*
neigh
;
int
changed
,
delay
;
int
msecs
=
50000
;
int
changed
;
unsigned
msecs
=
50000
,
delay
;
debugf
(
"Checking neighbours.
\n
"
);
...
...
@@ -268,7 +268,7 @@ check_neighbours()
unsigned
neighbour_rxcost
(
struct
neighbour
*
neigh
)
{
int
delay
;
unsigned
delay
;
unsigned
short
reach
=
neigh
->
reach
;
delay
=
timeval_minus_msec
(
&
now
,
&
neigh
->
hello_time
);
...
...
network.c
View file @
c4e6bf0e
...
...
@@ -114,7 +114,7 @@ update_hello_interval(struct network *net)
/* This should be no more than half the hello interval, so that hellos
aren't sent late. The result is in milliseconds. */
unsigned
int
unsigned
jitter
(
struct
network
*
net
,
int
urgent
)
{
unsigned
interval
=
net
->
hello_interval
;
...
...
@@ -125,7 +125,7 @@ jitter(struct network *net, int urgent)
return
roughly
(
interval
)
/
4
;
}
unsigned
int
unsigned
update_jitter
(
struct
network
*
net
,
int
urgent
)
{
unsigned
interval
=
net
->
hello_interval
;
...
...
network.h
View file @
c4e6bf0e
...
...
@@ -63,8 +63,8 @@ extern int numnets;
struct
network
*
add_network
(
char
*
ifname
);
int
network_idle
(
struct
network
*
net
);
int
update_hello_interval
(
struct
network
*
net
);
unsigned
int
jitter
(
struct
network
*
net
,
int
urgent
);
unsigned
int
update_jitter
(
struct
network
*
net
,
int
urgent
);
unsigned
jitter
(
struct
network
*
net
,
int
urgent
);
unsigned
update_jitter
(
struct
network
*
net
,
int
urgent
);
void
delay_jitter
(
struct
timeval
*
time
,
struct
timeval
*
timeout
,
int
msecs
);
int
network_up
(
struct
network
*
net
,
int
up
);
int
network_ll_address
(
struct
network
*
net
,
const
unsigned
char
*
address
);
...
...
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