summaryrefslogtreecommitdiff
path: root/daemons
diff options
context:
space:
mode:
authorPawel Modrzejewski <Pawel.Modrzejewski@harman.com>2018-01-08 14:17:27 +0100
committerPawel Modrzejewski <Pawel.Modrzejewski@harman.com>2018-01-08 14:45:31 +0100
commit3442b063cb95ffce9f60f3ead1b03cf3e62892b9 (patch)
tree050b330d02db59381e3d94e6f6855b0a73eb4af9 /daemons
parent7c499af6d34745bb8ff7f171bb848ad165c3401f (diff)
downloadOpen-AVB-3442b063cb95ffce9f60f3ead1b03cf3e62892b9.tar.gz
gptp: simple fixing/adding logging
Details: - changed fprintf to proper error log message; - error log messege added to avoid silent passing Sync/FollowUp processing;
Diffstat (limited to 'daemons')
-rw-r--r--daemons/gptp/common/ptp_message.cpp1
-rw-r--r--daemons/gptp/linux/src/linux_hal_common.cpp4
2 files changed, 2 insertions, 3 deletions
diff --git a/daemons/gptp/common/ptp_message.cpp b/daemons/gptp/common/ptp_message.cpp
index 6decc7a3..79c85e43 100644
--- a/daemons/gptp/common/ptp_message.cpp
+++ b/daemons/gptp/common/ptp_message.cpp
@@ -1037,6 +1037,7 @@ void PTPMessageFollowUp::processMessage
port->incCounter_ieee8021AsPortStatRxFollowUpCount();
if (!port->getLinkDelay(&delay))
+ GPTP_LOG_ERROR("Received Follow up but there is no valid link delay");
goto done;
master_local_freq_offset = tlv.getRateOffset();
diff --git a/daemons/gptp/linux/src/linux_hal_common.cpp b/daemons/gptp/linux/src/linux_hal_common.cpp
index 3be16c86..77bf664f 100644
--- a/daemons/gptp/linux/src/linux_hal_common.cpp
+++ b/daemons/gptp/linux/src/linux_hal_common.cpp
@@ -528,9 +528,7 @@ bool LinuxTimerQueue::addEvent
its.it_value.tv_nsec = (micros % 1000000) * 1000;
err = timer_settime( outer_arg->timer_handle, 0, &its, NULL );
if( err < 0 ) {
- fprintf
- ( stderr, "Failed to arm timer: %s\n",
- strerror( errno ));
+ GPTP_LOG_ERROR("Failed to arm timer: %s", strerror(errno));
return false;
}
}