Commit 2d816dc7 authored by Adam Wujek's avatar Adam Wujek 💬

userspace/tools: wr_mon fix number of retries in read_ports

read_ports should return -1 when it cannot get consistent
data within 100 tries
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent 13b086ef
......@@ -36,9 +36,10 @@ int read_ports(void){
memcpy(hal_ports_local_copy, hal_ports,
hal_nports_local*sizeof(struct hal_port_state));
retries++;
if (retries > 100)
return -1;
usleep(1000);
} while (wrs_shm_seqretry(hal_head, ii));
if (retries > 100)
return -1;
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment