summaryrefslogtreecommitdiff
path: root/daemons
diff options
context:
space:
mode:
authorandrew-elder <aelder@audioscience.com>2017-09-12 12:00:25 -0400
committerGitHub <noreply@github.com>2017-09-12 12:00:25 -0400
commit6cd1bffd000c24c4b6298442d77a2253960bfdfb (patch)
treee4e852ffc9757221612d06a48c49605264898acc /daemons
parentcda79716cd18ec755f5187c45719c5e6c6d2e563 (diff)
parenta3d75c5ce57f025459bbaa4ed3df045c3664dcd9 (diff)
downloadOpen-AVB-6cd1bffd000c24c4b6298442d77a2253960bfdfb.tar.gz
Merge pull request #691 from ethan-stewart-iol/open-avb-next
listen for announces on init and linkup
Diffstat (limited to 'daemons')
-rw-r--r--daemons/gptp/common/common_port.cpp5
-rw-r--r--daemons/gptp/common/ether_port.cpp3
2 files changed, 5 insertions, 3 deletions
diff --git a/daemons/gptp/common/common_port.cpp b/daemons/gptp/common/common_port.cpp
index 4d7977d4..d8ba54f6 100644
--- a/daemons/gptp/common/common_port.cpp
+++ b/daemons/gptp/common/common_port.cpp
@@ -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
diff --git a/daemons/gptp/common/ether_port.cpp b/daemons/gptp/common/ether_port.cpp
index 024531cc..2325fb99 100644
--- a/daemons/gptp/common/ether_port.cpp
+++ b/daemons/gptp/common/ether_port.cpp
@@ -408,7 +408,8 @@ bool EtherPort::_processEvent( Event e )
} else if( getPortState() == PTP_MASTER ) {
becomeMaster( true );
} else {
- startAnnounce();
+ clock->addEventTimerLocked(this, ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES,
+ ANNOUNCE_RECEIPT_TIMEOUT_MULTIPLIER * pow(2.0, getAnnounceInterval()) * 1000000000.0);
}
if (automotive_profile) {