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/common_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/common_port.cpp')
-rw-r--r-- | daemons/gptp/common/common_port.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/daemons/gptp/common/common_port.cpp b/daemons/gptp/common/common_port.cpp index 512c579b..d8ba54f6 100644 --- a/daemons/gptp/common/common_port.cpp +++ b/daemons/gptp/common/common_port.cpp @@ -311,7 +311,7 @@ void CommonPort::stopSyncReceiptTimer( void ) void CommonPort::startSyncIntervalTimer ( long long unsigned int waitTime ) { - syncIntervalTimerLock->lock(); + if( syncIntervalTimerLock->trylock() == oslock_fail ) return; clock->deleteEventTimerLocked(this, SYNC_INTERVAL_TIMEOUT_EXPIRES); clock->addEventTimerLocked (this, SYNC_INTERVAL_TIMEOUT_EXPIRES, waitTime); @@ -550,7 +550,7 @@ bool CommonPort::processEvent( Event e ) // If port has been configured as master or slave, run media // specific configuration. If it hasn't been configured - // start announce message time + // start listening for announce messages if( clock->getPriority1() == 255 || port_state == PTP_SLAVE ) { @@ -562,7 +562,8 @@ bool CommonPort::processEvent( Event e ) } else { - startAnnounce(); + clock->addEventTimerLocked(this, ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES, + ANNOUNCE_RECEIPT_TIMEOUT_MULTIPLIER * pow(2.0, getAnnounceInterval()) * 1000000000.0); } // Do any media specific initialization @@ -597,13 +598,9 @@ bool CommonPort::processEvent( Event e ) case ANNOUNCE_INTERVAL_TIMEOUT_EXPIRES: GPTP_LOG_DEBUG("ANNOUNCE_INTERVAL_TIMEOUT_EXPIRES occured"); - if( !asCapable ) - { - ret = true; - break; - } // Send an announce message + if ( asCapable) { PTPMessageAnnounce *annc = new PTPMessageAnnounce(this); |