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
b4453d10
Commit
b4453d10
authored
Mar 16, 2008
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move message_source_id around.
parent
60ea90a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
21 deletions
+22
-21
message.c
message.c
+22
-21
No files found.
message.c
View file @
b4453d10
...
...
@@ -444,27 +444,6 @@ send_message(struct network *net,
schedule_flush
(
net
);
}
static
const
unsigned
char
*
message_source_id
(
struct
network
*
net
)
{
int
i
;
assert
(
net
->
buffered
%
24
==
0
);
i
=
net
->
buffered
/
24
-
1
;
while
(
i
>=
0
)
{
const
unsigned
char
*
message
;
message
=
(
const
unsigned
char
*
)(
net
->
sendbuf
+
i
*
24
);
if
(
message
[
0
]
==
3
)
return
message
+
8
;
else
if
(
message
[
0
]
==
4
)
i
--
;
else
break
;
}
return
NULL
;
}
void
send_hello_noupdate
(
struct
network
*
net
,
unsigned
interval
)
{
...
...
@@ -591,6 +570,28 @@ send_unicast_request(struct neighbour *neigh,
send_unicast_packet
(
neigh
,
buf
,
24
);
}
/* Return the source-id of the last buffered update message. */
static
const
unsigned
char
*
message_source_id
(
struct
network
*
net
)
{
int
i
;
assert
(
net
->
buffered
%
24
==
0
);
i
=
net
->
buffered
/
24
-
1
;
while
(
i
>=
0
)
{
const
unsigned
char
*
message
;
message
=
(
const
unsigned
char
*
)(
net
->
sendbuf
+
i
*
24
);
if
(
message
[
0
]
==
3
)
return
message
+
8
;
else
if
(
message
[
0
]
==
4
)
i
--
;
else
break
;
}
return
NULL
;
}
static
void
really_send_update
(
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