@@ -165,7 +165,7 @@ static void ptp_send_sync_message() {
165165 sync_ .pTxCb = ptp_send_follow_up ;
166166 sync_ .tx_dm = S .profile .delayMechanism ;
167167 sync_ .tx_mc = PTP_MC_EVENT ;
168- sync_ .ttl = FLEXPTP_RANDOM_TAGGED_MESSAGE_TTL_TICKS ; //S.master.syncTickPeriod;
168+ sync_ .ttl = FLEXPTP_RANDOM_TAGGED_MESSAGE_TTL_TICKS ; // S.master.syncTickPeriod;
169169
170170 // send message
171171 ptp_transmit_enqueue (& sync_ );
@@ -317,7 +317,7 @@ void ptp_master_process_message(RawPtpMessage *pRawMsg, PtpHeader *pHeader) {
317317 return ;
318318 }
319319
320- PtpDelay_RespIdentification delay_respID ; // acquire PDelay_Resp(_Follow_Up) identification info
320+ PtpDelay_RespIdentification delay_respID ; // acquire PDelay_Resp(_Follow_Up) identification info
321321 ptp_read_delay_resp_id_data (& delay_respID , pRawMsg -> data );
322322
323323 if ((delay_respID .requestingSourceClockIdentity == S .hwoptions .clockIdentity ) &&
@@ -439,19 +439,22 @@ void ptp_master_tick() {
439439 // gating signal for Sync and Announce transmission
440440 bool infoEn = (dm == PTP_DM_E2E ) || ((dm == PTP_DM_P2P ) && ((S .master .p2pSlave .state == PTP_P2PSS_ESTABLISHED ) || (!(S .profile .flags & PTP_PF_ISSUE_SYNC_FOR_COMPLIANT_SLAVE_ONLY_IN_P2P ))));
441441
442- if (infoEn ) {
443- // Sync transmission
444- if (++ S .master .syncTmr >= S .master .syncTickPeriod ) {
445- S .master .syncTmr = 0 ;
442+ // Sync transmission
443+ if (++ S .master .syncTmr >= S .master .syncTickPeriod ) {
444+ S .master .syncTmr = 0 ;
445+
446+ if (infoEn ) {
446447 ptp_send_sync_message ();
447448 PTP_IUEV (PTP_UEV_SYNC_SENT );
448449 }
450+ }
449451
450- // Announce transmission
451- if (++ S .master .announceTmr >= S .master .announceTickPeriod ) { // advance Announce timer
452- S .master .announceTmr = 0 ;
453- }
452+ // Announce transmission
453+ if (++ S .master .announceTmr >= S .master .announceTickPeriod ) { // advance Announce timer
454+ S .master .announceTmr = 0 ;
455+ }
454456
457+ if (infoEn ) {
455458 // shift Announce transmission phase with 1 tick
456459 if (S .master .announceTmr == 1 ) {
457460 ptp_send_announce_message ();
0 commit comments