diff options
author | andrew-elder <aelder@audioscience.com> | 2017-10-07 16:33:38 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-07 16:33:38 -0400 |
commit | 21422721301a409209f9dbb04d0c102a2e072b7a (patch) | |
tree | a17c45107028ff33055aefa25e14e5bc195e5ff1 /daemons/gptp/common/ether_port.cpp | |
parent | bffc91619ffff1990d81e7326d7d5879a705f523 (diff) | |
parent | 67cee412de055c7a49a8e37f1ee870269d3f5abb (diff) | |
download | Open-AVB-feature-appveyor.tar.gz |
Merge pull request #701 from andrew-elder/feature/appveyorfeature-appveyor
appveyor - working
Diffstat (limited to 'daemons/gptp/common/ether_port.cpp')
-rw-r--r-- | daemons/gptp/common/ether_port.cpp | 9 |
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 ); |