Skip to content

Commit

Permalink
clkmgr: Fix Incorrect gm_changed event status.
Browse files Browse the repository at this point in the history
Signed-off-by: Lai Peter Jun Ann <[email protected]>
  • Loading branch information
Lai Peter Jun Ann committed Nov 7, 2024
1 parent 59c7506 commit a6019d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 1 addition & 2 deletions clkmgr/client/notification_msg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,7 @@ PROCESS_MESSAGE_TYPE(ClientNotificationMessage::processMessage)
client_ptp_data->gm_changed_event_count.fetch_add(1,
std::memory_order_relaxed);
clkmgrCurrentState.gm_changed = true;
} else
clkmgrCurrentState.gm_changed = false;
}
if((eventSub & eventASCapable) &&
(proxy_data.as_capable != client_ptp_data->as_capable)) {
client_ptp_data->as_capable = proxy_data.as_capable;
Expand Down
3 changes: 3 additions & 0 deletions clkmgr/client/subscribe_msg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,4 +246,7 @@ void ClientSubscribeMessage::resetClientPtpEventStruct(sessionId_t sID,
client_ptp_data->synced_to_gm_event_count;
eventCount.gm_changed_event_count = client_ptp_data->gm_changed_event_count;
eventCount.composite_event_count = client_ptp_data->composite_event_count;
/* Reset gm_changed event if the event count is 0 */
if(client_ptp_data->gm_changed_event_count == 0)
clkmgrCurrentState->gm_changed = false;
}

0 comments on commit a6019d7

Please sign in to comment.