diff options
author | Thomas Eckert <teckert@audioscience.com> | 2013-11-18 10:21:15 -0500 |
---|---|---|
committer | Andrew Elder <aelder@audioscience.com> | 2013-12-09 08:31:01 -0500 |
commit | 32d59d82495d2aabda9c952016a6a2dce372be90 (patch) | |
tree | b6613e94beedac9a01d9514e0b12982bc7f2bae5 | |
parent | c40868e17d006a24dac157ed49ce10f936555324 (diff) | |
download | Open-AVB-32d59d82495d2aabda9c952016a6a2dce372be90.tar.gz |
gPTP - don't start sync timeout in slave mode until we recieve the first sync
-rw-r--r-- | daemons/gptp/common/ieee1588port.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/daemons/gptp/common/ieee1588port.cpp b/daemons/gptp/common/ieee1588port.cpp index 27ad6b69..5b84c380 100644 --- a/daemons/gptp/common/ieee1588port.cpp +++ b/daemons/gptp/common/ieee1588port.cpp @@ -392,7 +392,7 @@ void IEEE1588Port::processEvent(Event e) } else if( port_state == PTP_MASTER ) {
becomeMaster( false );
} else {
- e3 = SYNC_RECEIPT_TIMEOUT_EXPIRES;
+ //e3 = SYNC_RECEIPT_TIMEOUT_EXPIRES;
e4 = ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES;
interval3 = (unsigned long long)
(SYNC_RECEIPT_TIMEOUT_MULTIPLIER*
@@ -891,13 +891,15 @@ void IEEE1588Port::becomeMaster( bool annc ) { }
void IEEE1588Port::becomeSlave( bool restart_syntonization ) {
- port_state = PTP_SLAVE;
clock->deleteEventTimer( this, ANNOUNCE_INTERVAL_TIMEOUT_EXPIRES );
clock->deleteEventTimer( this, SYNC_INTERVAL_TIMEOUT_EXPIRES );
- clock->addEventTimer
+
+ port_state = PTP_SLAVE;
+
+ /*clock->addEventTimer
( this, SYNC_RECEIPT_TIMEOUT_EXPIRES,
(SYNC_RECEIPT_TIMEOUT_MULTIPLIER*
- (unsigned long long)(pow((double)2,getSyncInterval())*1000000000.0)));
+ (unsigned long long)(pow((double)2,getSyncInterval())*1000000000.0)));*/
clock->addEventTimer
(this, ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES,
(ANNOUNCE_RECEIPT_TIMEOUT_MULTIPLIER*
|