fix timesync to send time update (#207)

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
This commit is contained in:
Steve Karg
2021-12-16 19:10:19 -06:00
committed by GitHub
parent 94f02a9a21
commit 0d9ba89616
+2 -5
View File
@@ -155,14 +155,11 @@ bool handler_timesync_recipient_write(BACNET_WRITE_PROPERTY_DATA *wp_data)
static void handler_timesync_send(BACNET_DATE_TIME *current_date_time)
{
unsigned index = 0;
bool status = false;
for (index = 0; index < MAX_TIME_SYNC_RECIPIENTS; index++) {
if (Time_Sync_Recipients[index].tag == 1) {
if (status) {
Send_TimeSync_Remote(&Time_Sync_Recipients[index].type.address,
&current_date_time->date, &current_date_time->time);
}
Send_TimeSync_Remote(&Time_Sync_Recipients[index].type.address,
&current_date_time->date, &current_date_time->time);
}
}
}