Fix check for timestamping modes
The code was checking the wrong interface's capabilities. Signed-off-by: Andy Lutomirski <luto@amacapital.net>master
parent
b74e46724e
commit
f6536fe36a
2
ptp4l.c
2
ptp4l.c
|
@ -335,7 +335,7 @@ int main(int argc, char *argv[])
|
||||||
/* check whether timestamping mode is supported. */
|
/* check whether timestamping mode is supported. */
|
||||||
for (i = 0; i < cfg_settings.nports; i++) {
|
for (i = 0; i < cfg_settings.nports; i++) {
|
||||||
if (iface[i].ts_info.valid &&
|
if (iface[i].ts_info.valid &&
|
||||||
((iface[0].ts_info.so_timestamping & required_modes) != required_modes)) {
|
((iface[i].ts_info.so_timestamping & required_modes) != required_modes)) {
|
||||||
fprintf(stderr, "interface '%s' does not support "
|
fprintf(stderr, "interface '%s' does not support "
|
||||||
"requested timestamping mode.\n",
|
"requested timestamping mode.\n",
|
||||||
iface[i].name);
|
iface[i].name);
|
||||||
|
|
Loading…
Reference in New Issue