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
5ad6fd57
Commit
5ad6fd57
authored
Feb 28, 2013
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
diag: use pp_error in a few places; fix %09i
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
543959a7
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
11 deletions
+15
-11
posix-socket.c
arch-gnu-linux/posix-socket.c
+5
-4
fsm.c
fsm.c
+1
-1
wr-servo.c
proto-ext-whiterabbit/wr-servo.c
+2
-2
common-fun.c
proto-standard/common-fun.c
+6
-3
common-fun.h
proto-standard/common-fun.h
+1
-1
No files found.
arch-gnu-linux/posix-socket.c
View file @
5ad6fd57
...
...
@@ -55,12 +55,12 @@ static int posix_recv_msg(int fd, void *pkt, int len, TimeInternal *t)
return
ret
;
}
if
(
msg
.
msg_flags
&
MSG_TRUNC
)
{
PP_PRINTF
(
"Error: received truncated message
\n
"
);
pp_error
(
"%s: truncated message
\n
"
,
__func__
);
return
0
;
}
/* get time stamp of packet */
if
(
msg
.
msg_flags
&
MSG_CTRUNC
)
{
PP_PRINTF
(
"Error: received truncated ancillary data
\n
"
);
pp_error
(
"%s: truncated ancillary data
\n
"
,
__func__
);
return
0
;
}
...
...
@@ -75,8 +75,9 @@ static int posix_recv_msg(int fd, void *pkt, int len, TimeInternal *t)
if
(
tv
)
{
t
->
seconds
=
tv
->
tv_sec
;
t
->
nanoseconds
=
tv
->
tv_usec
*
1000
;
PP_VPRINTF
(
"kernel recv time stamp %us %dns
\n
"
,
t
->
seconds
,
t
->
nanoseconds
);
if
(
pp_verbose_time
)
pp_printf
(
"%s: %9li.%06li
\n
"
,
__func__
,
tv
->
tv_sec
,
tv
->
tv_usec
);
}
else
{
/*
* get the recording time here, even though it may put a big
...
...
fsm.c
View file @
5ad6fd57
...
...
@@ -19,7 +19,7 @@ int pp_state_machine(struct pp_instance *ppi, uint8_t *packet, int plen)
int
state
,
err
;
if
(
plen
>
0
)
PP_VPRINTF
(
"RECV %02d %d.%d %s
\n
"
,
plen
,
PP_VPRINTF
(
"RECV %02d %d.%
09
d %s
\n
"
,
plen
,
(
int
)
ppi
->
last_rcv_time
.
seconds
,
(
int
)
ppi
->
last_rcv_time
.
nanoseconds
,
pp_msg_names
[
packet
[
0
]
&
0x0f
]);
...
...
proto-ext-whiterabbit/wr-servo.c
View file @
5ad6fd57
...
...
@@ -259,7 +259,7 @@ int wr_servo_update(struct pp_instance *ppi)
if
(
!
s
->
t1
.
correct
||
!
s
->
t2
.
correct
||
!
s
->
t3
.
correct
||
!
s
->
t4
.
correct
)
{
PP_VPRINTF
(
"servo: TimestampsIncorrect: %d %d %d %d
\n
"
,
pp_error
(
"%s: TimestampsIncorrect: %d %d %d %d
\n
"
,
__func__
,
s
->
t1
.
correct
,
s
->
t2
.
correct
,
s
->
t3
.
correct
,
s
->
t4
.
correct
);
return
0
;
...
...
@@ -269,7 +269,7 @@ int wr_servo_update(struct pp_instance *ppi)
got_sync
=
0
;
if
(
0
)
{
/* enable for debugging */
if
(
pp_verbose_servo
)
{
dump_timestamp
(
"servo:t1"
,
s
->
t1
);
dump_timestamp
(
"servo:t2"
,
s
->
t2
);
dump_timestamp
(
"servo:t3"
,
s
->
t3
);
...
...
proto-standard/common-fun.c
View file @
5ad6fd57
...
...
@@ -256,17 +256,20 @@ int st_com_slave_handle_followup(struct pp_instance *ppi, unsigned char *buf,
return
-
1
;
if
(
!
ppi
->
is_from_cur_par
)
{
PP_VPRINTF
(
"SequenceID doesn't match last Sync message
\n
"
);
pp_error
(
"%s: SequenceID doesn't match last Sync message
\n
"
,
__func__
);
return
0
;
}
if
(
!
ppi
->
waiting_for_follow
)
{
PP_VPRINTF
(
"Slave was not waiting a follow up message
\n
"
);
pp_error
(
"%s: Slave was not waiting a follow up message
\n
"
,
__func__
);
return
0
;
}
if
(
ppi
->
recv_sync_sequence_id
!=
hdr
->
sequenceId
)
{
PP_VPRINTF
(
"Follow up message is not from current parent
\n
"
);
pp_error
(
"%s: Follow up message is not from current parent
\n
"
,
__func__
);
return
0
;
}
...
...
proto-standard/common-fun.h
View file @
5ad6fd57
...
...
@@ -48,7 +48,7 @@ int st_com_handle_pdelay_req(struct pp_instance *ppi, unsigned char *buf,
return -1; \
} \
if (pp_verbose_frames) \
PP_VPRINTF("SENT %02d %d.%d %s\n", w, \
PP_VPRINTF("SENT %02d %d.%
09
d %s\n", w, \
ppi->last_snt_time.seconds, \
ppi->last_snt_time.nanoseconds, \
pp_msg_names[PPM_##x]); \
...
...
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