summaryrefslogtreecommitdiff
path: root/daemons/gptp/common/ether_port.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'daemons/gptp/common/ether_port.cpp')
-rw-r--r--daemons/gptp/common/ether_port.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/daemons/gptp/common/ether_port.cpp b/daemons/gptp/common/ether_port.cpp
index f517c181..2325fb99 100644
--- a/daemons/gptp/common/ether_port.cpp
+++ b/daemons/gptp/common/ether_port.cpp
@@ -403,6 +403,15 @@ bool EtherPort::_processEvent( Event e )
GPTP_LOG_STATUS("LINKUP");
}
+ if( clock->getPriority1() == 255 || getPortState() == PTP_SLAVE ) {
+ becomeSlave( true );
+ } else if( getPortState() == PTP_MASTER ) {
+ becomeMaster( true );
+ } else {
+ clock->addEventTimerLocked(this, ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES,
+ ANNOUNCE_RECEIPT_TIMEOUT_MULTIPLIER * pow(2.0, getAnnounceInterval()) * 1000000000.0);
+ }
+
if (automotive_profile) {
setAsCapable( true );