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
5b9587c1
Commit
5b9587c1
authored
Aug 25, 2007
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Split send_hello into send_hello_noupdate.
parent
6e4b3d91
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
message.c
message.c
+10
-5
message.h
message.h
+1
-0
No files found.
message.c
View file @
5b9587c1
...
@@ -355,17 +355,22 @@ message_source_id(struct network *net)
...
@@ -355,17 +355,22 @@ message_source_id(struct network *net)
}
}
void
void
send_hello
(
struct
network
*
net
)
send_hello
_noupdate
(
struct
network
*
net
,
unsigned
interval
)
{
{
int
changed
;
debugf
(
"Sending hello to %s.
\n
"
,
net
->
ifname
);
debugf
(
"Sending hello to %s.
\n
"
,
net
->
ifname
);
changed
=
update_hello_interval
(
net
);
net
->
hello_seqno
=
((
net
->
hello_seqno
+
1
)
&
0xFFFF
);
net
->
hello_seqno
=
((
net
->
hello_seqno
+
1
)
&
0xFFFF
);
net
->
hello_time
=
now
.
tv_sec
;
net
->
hello_time
=
now
.
tv_sec
;
send_message
(
net
,
0
,
0
,
net
->
hello_seqno
,
send_message
(
net
,
0
,
0
,
net
->
hello_seqno
,
100
*
net
->
hello_interval
>
0xFFFF
?
interval
>
0xFFFF
?
0
:
interval
,
0
:
100
*
net
->
hello_interval
,
myid
);
myid
);
}
void
send_hello
(
struct
network
*
net
)
{
int
changed
;
changed
=
update_hello_interval
(
net
);
send_hello_noupdate
(
net
,
net
->
hello_interval
*
100
);
if
(
changed
)
if
(
changed
)
send_ihu
(
NULL
,
net
);
send_ihu
(
NULL
,
net
);
}
}
...
...
message.h
View file @
5b9587c1
...
@@ -40,6 +40,7 @@ extern const unsigned char packet_header[8];
...
@@ -40,6 +40,7 @@ extern const unsigned char packet_header[8];
void
parse_packet
(
const
unsigned
char
*
from
,
struct
network
*
net
,
void
parse_packet
(
const
unsigned
char
*
from
,
struct
network
*
net
,
const
unsigned
char
*
packet
,
int
len
);
const
unsigned
char
*
packet
,
int
len
);
void
flushbuf
(
struct
network
*
net
);
void
flushbuf
(
struct
network
*
net
);
void
send_hello_noupdate
(
struct
network
*
net
,
unsigned
interval
);
void
send_hello
(
struct
network
*
net
);
void
send_hello
(
struct
network
*
net
);
void
send_request
(
struct
network
*
net
,
void
send_request
(
struct
network
*
net
,
const
unsigned
char
*
prefix
,
unsigned
char
plen
);
const
unsigned
char
*
prefix
,
unsigned
char
plen
);
...
...
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