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
0e71267b
Commit
0e71267b
authored
Feb 23, 2017
by
Alessandro Rubini
Committed by
Adam Wujek
Feb 27, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
general: don't enter faulty state if tx fails
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
d6aefd73
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
10 additions
and
20 deletions
+10
-20
state-wr-calibration.c
proto-ext-whiterabbit/state-wr-calibration.c
+1
-1
state-wr-locked.c
proto-ext-whiterabbit/state-wr-locked.c
+0
-2
state-wr-m-lock.c
proto-ext-whiterabbit/state-wr-m-lock.c
+0
-2
state-wr-present.c
proto-ext-whiterabbit/state-wr-present.c
+3
-2
state-master.c
proto-standard/state-master.c
+1
-7
state-passive.c
proto-standard/state-passive.c
+3
-2
state-slave.c
proto-standard/state-slave.c
+2
-4
No files found.
proto-ext-whiterabbit/state-wr-calibration.c
View file @
0e71267b
...
...
@@ -136,5 +136,5 @@ int wr_calibration(struct pp_instance *ppi, unsigned char *pkt, int plen)
ppi
->
next_delay
=
wrp
->
wrStateTimeout
;
return
e
;
return
0
;
/* ignore error */
}
proto-ext-whiterabbit/state-wr-locked.c
View file @
0e71267b
...
...
@@ -43,8 +43,6 @@ int wr_locked(struct pp_instance *ppi, unsigned char *pkt, int plen)
ppi
->
next_state
=
WRS_RESP_CALIB_REQ
;
}
if
(
e
!=
0
)
ppi
->
next_state
=
PPS_FAULTY
;
ppi
->
next_delay
=
wrp
->
wrStateTimeout
;
return
e
;
...
...
proto-ext-whiterabbit/state-wr-m-lock.c
View file @
0e71267b
...
...
@@ -43,8 +43,6 @@ int wr_m_lock(struct pp_instance *ppi, unsigned char *pkt, int plen)
ppi
->
next_state
=
WRS_CALIBRATION
;
}
if
(
e
!=
0
)
ppi
->
next_state
=
PPS_FAULTY
;
ppi
->
next_delay
=
wrp
->
wrStateTimeout
;
return
e
;
...
...
proto-ext-whiterabbit/state-wr-present.c
View file @
0e71267b
...
...
@@ -49,8 +49,9 @@ int wr_present(struct pp_instance *ppi, unsigned char *pkt, int plen)
if
(
e
==
0
)
st_com_execute_slave
(
ppi
);
else
ppi
->
next_state
=
PPS_FAULTY
;
else
{
/* nothing, just stay here again */
}
ppi
->
next_delay
=
WR_DSPOR
(
ppi
)
->
wrStateTimeout
;
...
...
proto-standard/state-master.c
View file @
0e71267b
...
...
@@ -101,8 +101,7 @@ out:
ppi
->
next_state
=
PPS_LISTENING
;
break
;
case
PP_SEND_ERROR
:
goto
out_fault
;
/* fall through: a lost frame is not the end of the world */
case
PP_SEND_NO_STAMP
:
/* nothing, just keep the ball rolling */
e
=
0
;
...
...
@@ -113,10 +112,5 @@ out:
ppi
->
next_delay
=
pp_next_delay_3
(
ppi
,
PP_TO_ANN_SEND
,
PP_TO_SYNC_SEND
,
PP_TO_REQUEST
);
return
e
;
out_fault:
ppi
->
next_state
=
PPS_FAULTY
;
ppi
->
next_delay
=
500
;
/* just a delay to releif the system */
return
e
;
}
proto-standard/state-passive.c
View file @
0e71267b
...
...
@@ -51,8 +51,9 @@ int pp_passive(struct pp_instance *ppi, unsigned char *pkt, int plen)
if
(
e
==
0
)
e
=
st_com_execute_slave
(
ppi
);
if
(
e
!=
0
)
ppi
->
next_state
=
PPS_FAULTY
;
if
(
e
!=
0
)
{
/* ignore: a lost frame is not the end of the world */
}
ppi
->
next_delay
=
PP_DEFAULT_NEXT_DELAY_MS
;
...
...
proto-standard/state-slave.c
View file @
0e71267b
...
...
@@ -87,7 +87,7 @@ int pp_slave(struct pp_instance *ppi, unsigned char *pkt, int plen)
goto
out
;
}
e
=
pp_lib_may_issue_request
(
ppi
);
pp_lib_may_issue_request
(
ppi
);
/*
* The management of messages is now table-driven
...
...
@@ -100,8 +100,6 @@ int pp_slave(struct pp_instance *ppi, unsigned char *pkt, int plen)
pp_diag
(
ppi
,
frames
,
1
,
"Ignored frame %i
\n
"
,
hdr
->
messageType
);
}
if
(
e
)
goto
out
;
/*
* This function, common to passive,listening etc,
...
...
@@ -114,7 +112,7 @@ out:
case
PP_SEND_OK
:
/* 0 */
break
;
case
PP_SEND_ERROR
:
ppi
->
next_state
=
PPS_FAULTY
;
/* ignore: a lost frame is not the end of the world */
break
;
case
PP_SEND_NO_STAMP
:
/* nothing, just keep the ball rolling */
...
...
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