Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
PPSi
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
50
Issues
50
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
PPSi
Commits
82180bd9
Commit
82180bd9
authored
Jun 29, 2021
by
Adam Wujek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
proto-standard: improve handling of the overflow of timers in bmc.c
Signed-off-by:
Adam Wujek
<
dev_public@wujek.eu
>
parent
ed8a357a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
bmc.c
proto-standard/bmc.c
+3
-4
No files found.
proto-standard/bmc.c
View file @
82180bd9
...
...
@@ -969,9 +969,8 @@ struct pp_frgn_master * bmc_add_frgn_master(struct pp_instance *ppi, struct pp_
if
(
hdr
->
sequenceId
==
(
ppi
->
frgn_master
[
i
].
sequenceId
+
1
))
{
unsigned
long
now
=
TOPS
(
ppi
)
->
calc_timeout
(
ppi
,
0
);
frgn_master
->
qualified
=
(
UInteger32
)(
now
-
frgn_master
->
lastAnnounceMsgMs
)
<=
ppi
->
frgn_master_time_window_ms
;
frgn_master
->
qualified
=
time_before_eq
(
now
,
frgn_master
->
lastAnnounceMsgMs
+
ppi
->
frgn_master_time_window_ms
);
frgn_master
->
lastAnnounceMsgMs
=
now
;
}
/* already in Foreign master data set, update info */
...
...
@@ -1103,7 +1102,7 @@ static void bmc_age_frgn_master(struct pp_instance *ppi)
/* get qualification */
if
(
!
is_ebest
(
GLBS
(
ppi
),
frgn_master
)
)
{
if
(
(
UInteger32
)(
now
-
frgn_master
->
lastAnnounceMsgMs
)
>
ppi
->
frgn_master_time_window_ms
)
{
if
(
time_after
(
now
,
frgn_master
->
lastAnnounceMsgMs
+
ppi
->
frgn_master_time_window_ms
)
)
{
// Remove age out
pp_diag
(
ppi
,
bmc
,
1
,
"Aged out foreign master %i/%i
\n
"
,
i
,
ppi
->
frgn_rec_num
);
...
...
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