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
-3
View File
@@ -155,16 +155,13 @@ bool handler_timesync_recipient_write(BACNET_WRITE_PROPERTY_DATA *wp_data)
static void handler_timesync_send(BACNET_DATE_TIME *current_date_time) static void handler_timesync_send(BACNET_DATE_TIME *current_date_time)
{ {
unsigned index = 0; unsigned index = 0;
bool status = false;
for (index = 0; index < MAX_TIME_SYNC_RECIPIENTS; index++) { for (index = 0; index < MAX_TIME_SYNC_RECIPIENTS; index++) {
if (Time_Sync_Recipients[index].tag == 1) { if (Time_Sync_Recipients[index].tag == 1) {
if (status) {
Send_TimeSync_Remote(&Time_Sync_Recipients[index].type.address, Send_TimeSync_Remote(&Time_Sync_Recipients[index].type.address,
&current_date_time->date, &current_date_time->time); &current_date_time->date, &current_date_time->time);
} }
} }
}
} }
#endif #endif