mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-04 11:55:06 -05:00
cmdmon: return error if doffset command fails
This commit is contained in:
8
cmdmon.c
8
cmdmon.c
@@ -858,9 +858,13 @@ static void
|
|||||||
handle_doffset(CMD_Request *rx_message, CMD_Reply *tx_message)
|
handle_doffset(CMD_Request *rx_message, CMD_Reply *tx_message)
|
||||||
{
|
{
|
||||||
double doffset;
|
double doffset;
|
||||||
|
|
||||||
doffset = UTI_FloatNetworkToHost(rx_message->data.doffset.doffset);
|
doffset = UTI_FloatNetworkToHost(rx_message->data.doffset.doffset);
|
||||||
LCL_AccumulateOffset(doffset, 0.0);
|
if (!LCL_AccumulateOffset(doffset, 0.0)) {
|
||||||
LOG(LOGS_INFO, "Accumulated delta offset of %.6f seconds", doffset);
|
tx_message->status = htons(STT_FAILED);
|
||||||
|
} else {
|
||||||
|
LOG(LOGS_INFO, "Accumulated delta offset of %.6f seconds", doffset);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ================================================== */
|
/* ================================================== */
|
||||||
|
|||||||
Reference in New Issue
Block a user