From e91062cd53b848db50b3482e8d94f6913200669b Mon Sep 17 00:00:00 2001 From: skarg Date: Tue, 21 Jul 2009 14:07:38 +0000 Subject: [PATCH] The demo UTC time synchronization function 'Send_TimeSyncUTC was missing the NPDU encoding. Thank you, lopelope! --- bacnet-stack/demo/handler/s_ts.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bacnet-stack/demo/handler/s_ts.c b/bacnet-stack/demo/handler/s_ts.c index 96ca70e0..a15f7726 100644 --- a/bacnet-stack/demo/handler/s_ts.c +++ b/bacnet-stack/demo/handler/s_ts.c @@ -91,6 +91,10 @@ void Send_TimeSyncUTC( /* we could use unicast or broadcast */ datalink_get_broadcast_address(&dest); + /* encode the NPDU portion of the packet */ + npdu_encode_npdu_data(&npdu_data, false, MESSAGE_PRIORITY_NORMAL); + pdu_len = + npdu_encode_pdu(&Handler_Transmit_Buffer[0], &dest, NULL, &npdu_data); /* encode the APDU portion of the packet */ pdu_len = timesync_utc_encode_apdu(&Handler_Transmit_Buffer[0], bdate, btime);