Skip to content

Commit

Permalink
fix the check for supported timestamping modes
Browse files Browse the repository at this point in the history
Fix the check for supported timestamping modes. The device needs
to support all the required modes, not just any subset of them.

Signed-off-by: Jiri Bohac <[email protected]>
  • Loading branch information
jiribohac authored and richardcochran committed May 16, 2013
1 parent 7b02a5e commit 7ce1486
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ptp4l.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ int main(int argc, char *argv[])
/* check whether timestamping mode is supported. */
for (i = 0; i < cfg_settings.nports; i++) {
if (iface[i].ts_info.valid &&
!(iface[0].ts_info.so_timestamping & required_modes)) {
((iface[0].ts_info.so_timestamping & required_modes) != required_modes)) {
fprintf(stderr, "interface '%s' does not support "
"requested timestamping mode.\n",
iface[i].name);
Expand Down

0 comments on commit 7ce1486

Please sign in to comment.