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
47
Issues
47
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
2996dd7b
Commit
2996dd7b
authored
Jun 12, 2016
by
Davide Ciminaghi
Committed by
Alessandro Rubini
Sep 20, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compliance, 9.2.6.10: properly switch to MASTER or PRE_MASTER
parent
bd3f1fae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
bmc.c
proto-standard/bmc.c
+8
-4
No files found.
proto-standard/bmc.c
View file @
2996dd7b
...
...
@@ -189,7 +189,7 @@ static int bmc_dataset_cmp(struct pp_instance *ppi,
static
int
bmc_state_decision
(
struct
pp_instance
*
ppi
,
struct
pp_frgn_master
*
m
)
{
int
cmpres
;
int
cmpres
,
ret
;
struct
pp_frgn_master
myself
;
if
(
ppi
->
role
==
PPSI_ROLE_SLAVE
)
...
...
@@ -247,10 +247,14 @@ passive:
master:
//TODO: consider whether a smarter solution is needed for non-simple cases
if
(
cmpres
<
0
)
// it is M1 and M2, see IEEE1588-2008, page 87, in short switch is a GM
if
(
cmpres
<
0
)
{
// it is M1 and M2, see IEEE1588-2008, page 87, in short switch is a GM
m1
(
ppi
);
//GM
pp_diag
(
ppi
,
bmc
,
1
,
"%s: master
\n
"
,
__func__
);
return
PPS_MASTER
;
ret
=
PPS_MASTER
;
}
else
ret
=
PPS_PRE_MASTER
;
pp_diag
(
ppi
,
bmc
,
1
,
"%s: %smaster
\n
"
,
__func__
,
ret
==
PPS_PRE_MASTER
?
"pre-"
:
""
);
return
ret
;
slave:
s1
(
ppi
,
&
m
->
hdr
,
&
m
->
ann
);
...
...
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