milan-avb: gptp: emit gm_changed only when the GM actually changes

This commit is contained in:
hackerman-kl 2026-04-28 07:39:56 +02:00
parent f5389a4225
commit 1e9f89b638

View file

@ -198,8 +198,10 @@ static bool update_ts_refclk(struct gptp *gptp)
memcpy(gptp->clock_id, cid, 8); memcpy(gptp->clock_id, cid, 8);
memcpy(gptp->gm_id, gmid, 8); memcpy(gptp->gm_id, gmid, 8);
clock_gettime(CLOCK_REALTIME, &now); if (gmid_changed) {
server_emit_gm_changed(gptp->server, SPA_TIMESPEC_TO_NSEC(&now), gmid); clock_gettime(CLOCK_REALTIME, &now);
server_emit_gm_changed(gptp->server, SPA_TIMESPEC_TO_NSEC(&now), gmid);
}
return gmid_changed; return gmid_changed;
} }