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
ca26578f
Commit
ca26578f
authored
Sep 06, 2016
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trivial: fold pre-master.c into master.c
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
4f221227
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
24 deletions
+9
-24
ppsi.h
include/ppsi/ppsi.h
+0
-7
Makefile
proto-standard/Makefile
+0
-1
state-master.c
proto-standard/state-master.c
+9
-2
state-pre-master.c
proto-standard/state-pre-master.c
+0
-14
No files found.
include/ppsi/ppsi.h
View file @
ca26578f
...
...
@@ -419,13 +419,6 @@ extern pp_action pp_initializing, pp_faulty, pp_disabled, pp_listening,
pp_pre_master
,
pp_master
,
pp_passive
,
pp_uncalibrated
,
pp_slave
,
pp_pclock
;;
/*
* MASTER and PRE_MASTER have many things in common. This function implements
* both states. It is invoked by pp_master and pp_pre_master with pre
* respectively equal to 0 and 1.
*/
extern
int
_pp_master
(
struct
pp_instance
*
ppi
,
uint8_t
*
pkt
,
int
plen
,
int
pre
);
/* The engine */
extern
int
pp_state_machine
(
struct
pp_instance
*
ppi
,
uint8_t
*
packet
,
int
plen
);
...
...
proto-standard/Makefile
View file @
ca26578f
...
...
@@ -9,7 +9,6 @@ OBJ-y += $D/fsm-table.o \
$D
/state-faulty.o
\
$D
/state-disabled.o
\
$D
/state-listening.o
\
$D
/state-pre-master.o
\
$D
/state-master.o
\
$D
/state-passive.o
\
$D
/state-uncalibrated.o
\
...
...
proto-standard/state-master.c
View file @
ca26578f
...
...
@@ -10,9 +10,11 @@
#include "common-fun.h"
/*
* pre indicates that we're in PRE_MASTER slave
* MASTER and PRE_MASTER have many things in common. This function implements
* both states. It is invoked by pp_master and pp_pre_master with pre
* respectively equal to 0 and 1.
*/
int
_pp_master
(
struct
pp_instance
*
ppi
,
uint8_t
*
pkt
,
int
plen
,
int
pre
)
static
int
_pp_master
(
struct
pp_instance
*
ppi
,
uint8_t
*
pkt
,
int
plen
,
int
pre
)
{
int
msgtype
;
int
e
=
0
;
/* error var, to check errors in msg handling */
...
...
@@ -120,3 +122,8 @@ int pp_master(struct pp_instance *ppi, uint8_t *pkt, int plen)
{
return
_pp_master
(
ppi
,
pkt
,
plen
,
0
);
}
int
pp_pre_master
(
struct
pp_instance
*
ppi
,
unsigned
char
*
pkt
,
int
plen
)
{
return
_pp_master
(
ppi
,
pkt
,
plen
,
1
);
}
proto-standard/state-pre-master.c
deleted
100644 → 0
View file @
4f221227
/*
* Copyright (C) 2011 CERN (www.cern.ch)
* Author: Aurelio Colosimo
* Based on PTPd project v. 2.1.0 (see AUTHORS for details)
*
* Released according to the GNU LGPL, version 2.1 or any later version.
*/
#include <ppsi/ppsi.h>
int
pp_pre_master
(
struct
pp_instance
*
ppi
,
unsigned
char
*
pkt
,
int
plen
)
{
return
_pp_master
(
ppi
,
pkt
,
plen
,
1
);
}
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