phc2sys: fix race between signals and port initialization.
Check if a signal was received when waiting for ptp4l in the automatic mode to not get stuck in an infinite loop. Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>master
parent
e79e5040a0
commit
966eff0161
|
@ -1150,6 +1150,8 @@ static int auto_init_ports(struct node *node, int add_rt)
|
||||||
char iface[IFNAMSIZ];
|
char iface[IFNAMSIZ];
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
|
if (!is_running())
|
||||||
|
return -1;
|
||||||
res = run_pmc_clock_identity(node, 1000);
|
res = run_pmc_clock_identity(node, 1000);
|
||||||
if (res < 0)
|
if (res < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in New Issue