summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandrew-elder <aelder@audioscience.com>2018-06-07 12:16:19 -0400
committerGitHub <noreply@github.com>2018-06-07 12:16:19 -0400
commitdf587b7509a4dee7fa79a40eec5d6327310c472b (patch)
tree132b8a232973542bc16099e99fe467a52b540f8c
parentc253bd9204ed0fe85619266c0da1a47fbfdaab0a (diff)
parent9b96ee647da61ffdf06dad031d06b8b13228e697 (diff)
downloadOpen-AVB-df587b7509a4dee7fa79a40eec5d6327310c472b.tar.gz
Merge pull request #789 from AVnu/open-avb-next
Open avb next
-rw-r--r--daemons/gptp/common/avbts_clock.hpp6
-rw-r--r--daemons/gptp/common/common_port.cpp10
-rw-r--r--daemons/gptp/common/ptp_message.cpp4
3 files changed, 12 insertions, 8 deletions
diff --git a/daemons/gptp/common/avbts_clock.hpp b/daemons/gptp/common/avbts_clock.hpp
index 614464c2..22a72464 100644
--- a/daemons/gptp/common/avbts_clock.hpp
+++ b/daemons/gptp/common/avbts_clock.hpp
@@ -162,7 +162,9 @@ private:
OSLock *timerq_lock;
- /**
+public:
+
+ /**
* @brief Add a new event to the timer queue
* @param target EtherPort target
* @param e Event to be added
@@ -179,7 +181,7 @@ private:
* @return void
*/
void deleteEventTimer( CommonPort *target, Event e );
-public:
+
/**
* @brief Instantiates a IEEE 1588 Clock
* @param forceOrdinarySlave Forces it to be an ordinary slave
diff --git a/daemons/gptp/common/common_port.cpp b/daemons/gptp/common/common_port.cpp
index 268bc62d..dc47d9d2 100644
--- a/daemons/gptp/common/common_port.cpp
+++ b/daemons/gptp/common/common_port.cpp
@@ -296,18 +296,22 @@ bool CommonPort::restoreSerializedState
void CommonPort::startSyncReceiptTimer
( long long unsigned int waitTime )
{
+ clock->getTimerQLock();
syncReceiptTimerLock->lock();
- clock->deleteEventTimerLocked( this, SYNC_RECEIPT_TIMEOUT_EXPIRES );
- clock->addEventTimerLocked
+ clock->deleteEventTimer( this, SYNC_RECEIPT_TIMEOUT_EXPIRES );
+ clock->addEventTimer
( this, SYNC_RECEIPT_TIMEOUT_EXPIRES, waitTime );
syncReceiptTimerLock->unlock();
+ clock->putTimerQLock();
}
void CommonPort::stopSyncReceiptTimer( void )
{
+ clock->getTimerQLock();
syncReceiptTimerLock->lock();
- clock->deleteEventTimerLocked( this, SYNC_RECEIPT_TIMEOUT_EXPIRES );
+ clock->deleteEventTimer( this, SYNC_RECEIPT_TIMEOUT_EXPIRES );
syncReceiptTimerLock->unlock();
+ clock->putTimerQLock();
}
void CommonPort::startSyncIntervalTimer
diff --git a/daemons/gptp/common/ptp_message.cpp b/daemons/gptp/common/ptp_message.cpp
index e8835570..8dc6775c 100644
--- a/daemons/gptp/common/ptp_message.cpp
+++ b/daemons/gptp/common/ptp_message.cpp
@@ -1688,7 +1688,7 @@ void PTPMessagePathDelayRespFollowUp::processMessage
GPTP_LOG_VERBOSE("Request Sequence Id: %u", req->getSequenceId());
GPTP_LOG_VERBOSE("Response Sequence Id: %u", resp->getSequenceId());
- GPTP_LOG_VERBOSE("Follow-Up Sequence Id: %u", req->getSequenceId());
+ GPTP_LOG_VERBOSE("Follow-Up Sequence Id: %u", sequenceId);
int64_t link_delay;
unsigned long long turn_around;
@@ -1818,8 +1818,6 @@ void PTPMessagePathDelayRespFollowUp::processMessage
port->setPeerOffset( request_tx_timestamp, remote_req_rx_timestamp );
abort:
- delete req;
- eport->setLastPDelayReq(NULL);
delete resp;
eport->setLastPDelayResp(NULL);