Commit 6ce89ba6 authored by Adam Wujek's avatar Adam Wujek

monitor: use macro is_externalPortConfigurationEnabled

Instead of direct access to externalPortConfigurationEnabled.
It helps to optimize out some code if externalPortConfigurationEnabled is not used.
Signed-off-by: 's avatarAdam Wujek <adam.wujek@creotech.pl>
parent 7b42ba86
......@@ -43,6 +43,7 @@ struct dump_info dump_info[] = {
DUMP_FIELD(UInteger8, priority1),
DUMP_FIELD(UInteger8, priority2),
DUMP_FIELD(UInteger8, domainNumber),
DUMP_FIELD(yes_no_Boolean, slaveOnly),
/** Optional (IEEE1588-2019) */
// FIXME: DUMP_FIELD(Timestamp, currentTime),
......
......@@ -559,7 +559,7 @@ void print_main_data(void)
if (ppg->defaultDS->slaveOnly) {
strncpy(str_config, "slaveOnly", sizeof(str_config) - 1);
} else {
if (ppg->defaultDS->externalPortConfigurationEnabled) {
if (is_externalPortConfigurationEnabled(ppg->defaultDS)) {
int s = 0;
for (s = 0; s < sizeof(desired_states) / sizeof(struct desired_state_t); s++) {
if (desired_states[s].state == ppi_pt->externalPortConfigurationPortDS.desiredState) {
......
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