Commit d3e6511c authored by Adam Wujek's avatar Adam Wujek 💬 Committed by Alessandro Rubini

userspace/tools: fix wr-mon to show changes in ports' states

wr-mon didn't update ports' information read from hal while
running in interactive mode.

Now also explicitly call read_ports before show_all

Bug was introduced by commit:
"userspace/tools: change wr-mon to use shm for HAL"
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent e3a1c41b
......@@ -75,8 +75,6 @@ void init_shm(void)
"to the PTP daemon!\n");
exit(-1);
}
read_ports();
}
void show_ports(void)
......@@ -322,9 +320,11 @@ int main(int argc, char *argv[])
break;
case 'g':
mode = SHOW_SNMP_GLOBALS;
read_ports();
show_all();
exit(0);
case 'w': /* for the web interface */
read_ports();
show_unadorned_ports();
exit(0);
default:
......@@ -352,6 +352,7 @@ int main(int argc, char *argv[])
track_onoff);
}
}
read_ports();
show_all();
/* If we got broken pipe or anything, exit */
if (ferror(stdout))
......
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