From 3222244e4e94675f975142d833cc056e203fedb5 Mon Sep 17 00:00:00 2001 From: Steve Karg Date: Sun, 12 May 2024 09:06:23 -0500 Subject: [PATCH] Updated to version 1.3.6 for release on 2024-05-12 Mother's Day! (#635) * Updated to version 1.3.6 for release on 2024-05-12 Mother's Day! --- CHANGELOG.md | 76 +++++++++++++++++++++ CMakeLists.txt | 2 +- apps/ucov/main.c | 2 +- apps/whatisnetnum/main.c | 5 +- apps/writeprop/main.c | 2 +- src/bacnet/basic/object/channel.c | 3 - src/bacnet/basic/object/gateway/gw_device.c | 2 +- src/bacnet/datalink/bvlc.c | 2 - src/bacnet/version.h | 4 +- 9 files changed, 84 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a6999cb..929e5f28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,82 @@ The git repositories are hosted at the following sites: ### Fixed ### Removed +## [1.3.6] - 2024-05-12 + +### Security + +* Fixed bacapp snprintf to account for string size zero behavior of snprintf. +* Changed all the sprintf to use snprintf instead. (#628) + +### Added + +* Added Get/Set functions in the basic notification class object to support + properties relative permanence requirement. (#629) +* Added help text to explain how to decode complex data in the WriteProperty + example app. (#627) +* Added host_n_port_context_decode function. +* Added timestamp & datetime snprintf ASCII function. +* Added required linux Ethernet library for ethernet build. (#620) +* Added .obj to gitignore. (#620) +* Added create-object and delete-object recipes in GCC Makefile. (#620) +* Added datalink timer to all example OS apps. (#620) +* Added writefile API to basic file object example. (#620) +* Added API to device-client to make it more robust. (#620) +* Added API in network-port object for getting the ASCII object-name. (#620) +* Added debug print with a timestamp option. (#620) +* Added debug print with hex dump print. (#620) +* Added API to network port object for activate and discard. (#620) +* Added default define for debug with timestamp. (#620) +* Added prototype in header for disabled debug printf. (#620) +* Added fifo peek ahead function to peek at more than one byte. (#620) +* Added get-mac value for network port that uses buffer rather than + octetstring. (#620) +* Added API for basic multistate objects number-of-states. +* Added reliability, active-text, inactive-text to basic binary-input object. +* Added reliability property to basic binary-value object. +* Added API for setting multi state text with null-terminated name lists + in basic objects. (#614) +* Added Create/Delete object services to Analog Input, Analog Value, + Binary Input, Binary Value, Multistate Input, Multistate Value basic + object examples, and updated their units tests. (#612) + +### Changed + +* Changed clang-format to include AlignAfterOpenBracket: AlwaysBreak and + BinPackArguments: true. Used make pretty-test to reformat the test/bacnet + .c/.h files with the updated format. +* Changed most microcontroller ports to use BACAPP_MINIMAL to specify + which datatypes can be written. (#620) +* Changed format in CMake to enable cleaner SC merge. (#620) +* Changed the first instance of a basic integer value object from 1 to 0. (#619) +* Changed basic time-value object present-value to be decoupled from +current time, and changed out-of-service property to be writable. + +### Fixed + +* Fixed nuisance print messages in ports/linux/dlmstp by changing + to debug print only. (#633) +* Fixed compile warnings in basic objects. (#630) +* Added API for setting multi state text with null-terminated name lists + in basic objects. (#630) +* Fixed example app router-ipv6 to build under ports/win32. (#630) +* Fixed example app router-mstp to build under ports/win32 with MinGW. (#630) +* Fixed invalid comparison in life-safety-zone basic object. +* Fixed CMake build for BDT and FDT to only apply to BIP and BIP6 +* Fixed basic notification class object logic behind valid transitions. (#623) +* Fixed export build that uses rpm_ack_object_property_process(). (#622) +* Fixed zephyr bip_get_addr endian UDP port number +* Fixed BACnet port for APPLE to use BSD in CMake. (#620) +* Fixed zephyr OS for BACnet/IP warning. (#620) +* Fixed zephyr OS log to not require log_strdup. (#620) +* Fixed UDP port endian for zephyr os BACnet/IP +* Fixed basic network port object header dependency on readrange.h file +* Fixed basic binary object active and inactive text setting. +* Fixed unit test checking for unknown property in basic objects. +* Fixed example apps to enable binding to device instance 4194303. (#615) +* Fixed compile warnings in basic objects. (#614) +* Fixed life safety zone default object name. (#613) + ## [1.3.5] - 2024-04-01 ### Security diff --git a/CMakeLists.txt b/CMakeLists.txt index 76d0651e..e3f85319 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.1 FATAL_ERROR) project( bacnet-stack - VERSION 1.3.5 + VERSION 1.3.6 LANGUAGES C) # diff --git a/apps/ucov/main.c b/apps/ucov/main.c index 49cc1108..c2d1391c 100644 --- a/apps/ucov/main.c +++ b/apps/ucov/main.c @@ -132,7 +132,7 @@ static void print_usage(char *filename) int main(int argc, char *argv[]) { - char *value_string = NULL; + char *value_string; bool status = false; BACNET_COV_DATA cov_data; BACNET_PROPERTY_VALUE value_list; diff --git a/apps/whatisnetnum/main.c b/apps/whatisnetnum/main.c index fd512ebc..e39cb242 100644 --- a/apps/whatisnetnum/main.c +++ b/apps/whatisnetnum/main.c @@ -77,7 +77,6 @@ static void My_Router_Handler(BACNET_ADDRESS *src, uint16_t npdu_len) { uint16_t dnet = 0; - uint16_t len = 0; uint16_t j = 0; switch (npdu_data->network_message_type) { @@ -94,7 +93,7 @@ static void My_Router_Handler(BACNET_ADDRESS *src, /* It shall be transmitted with a local broadcast address, and shall never be routed. */ if (npdu_len >= 2) { - len += decode_unsigned16(npdu, &dnet); + (void)decode_unsigned16(npdu, &dnet); printf(": network number = %u\n", (unsigned)dnet); } else { printf(": network number = missing!\n"); @@ -104,7 +103,7 @@ static void My_Router_Handler(BACNET_ADDRESS *src, contain SNET/SADR or DNET/DADR information In the NPCI or that are sent with a local unicast address. */ if (npdu_len >= 2) { - len += decode_unsigned16(npdu, &dnet); + (void)decode_unsigned16(npdu, &dnet); printf(": network number = %u. SNET=%u\n", (unsigned)dnet, (unsigned)src->net); } else { diff --git a/apps/writeprop/main.c b/apps/writeprop/main.c index 1b80a264..9e35dccf 100644 --- a/apps/writeprop/main.c +++ b/apps/writeprop/main.c @@ -254,7 +254,7 @@ int main(int argc, char *argv[]) time_t current_seconds = 0; time_t timeout_seconds = 0; bool found = false; - char *value_string = NULL; + char *value_string; bool status = false; int args_remaining = 0, tag_value_arg = 0, i = 0; long property_tag; diff --git a/src/bacnet/basic/object/channel.c b/src/bacnet/basic/object/channel.c index 167070f0..38f3a537 100644 --- a/src/bacnet/basic/object/channel.c +++ b/src/bacnet/basic/object/channel.c @@ -1528,7 +1528,6 @@ bool Channel_Write_Property(BACNET_WRITE_PROPERTY_DATA *wp_data) BACNET_APPLICATION_DATA_VALUE value; int element_len = 0; uint32_t count = 0; - uint32_t array_index = 0; /* decode the some of the request */ len = bacapp_decode_application_data( @@ -1589,7 +1588,6 @@ bool Channel_Write_Property(BACNET_WRITE_PROPERTY_DATA *wp_data) wp_data->error_code = ERROR_CODE_WRITE_ACCESS_DENIED; } else if (wp_data->array_index == BACNET_ARRAY_ALL) { count = CONTROL_GROUPS_MAX; - array_index = 1; /* extra elements still encoded in application data */ element_len = len; do { @@ -1611,7 +1609,6 @@ bool Channel_Write_Property(BACNET_WRITE_PROPERTY_DATA *wp_data) } } count--; - array_index++; if (count) { element_len = bacapp_decode_application_data( &wp_data->application_data[len], diff --git a/src/bacnet/basic/object/gateway/gw_device.c b/src/bacnet/basic/object/gateway/gw_device.c index 20f3bbfb..0d85c38f 100644 --- a/src/bacnet/basic/object/gateway/gw_device.c +++ b/src/bacnet/basic/object/gateway/gw_device.c @@ -361,7 +361,7 @@ bool Routed_Device_Is_Valid_Network(uint16_t dest_net, int *DNET_list) uint32_t Routed_Device_Index_To_Instance(unsigned index) { - index = index; + (void)index; return Devices[iCurrent_Device_Idx].bacObj.Object_Instance_Number; } diff --git a/src/bacnet/datalink/bvlc.c b/src/bacnet/datalink/bvlc.c index e1cd1d20..a95b5460 100644 --- a/src/bacnet/datalink/bvlc.c +++ b/src/bacnet/datalink/bvlc.c @@ -2139,7 +2139,6 @@ bool bvlc_address_from_ascii(BACNET_IP_ADDRESS *addr, const char *addrstr) uint16_t tmp = 0; char c = 0; unsigned char i = 0, j = 0; - uint8_t charsread = 0; if (!addr) { return false; @@ -2168,7 +2167,6 @@ bool bvlc_address_from_ascii(BACNET_IP_ADDRESS *addr, const char *addrstr) return false; } ++addrstr; - ++charsread; } while ((c != '.') && (c != 0) && (c != ' ')); } diff --git a/src/bacnet/version.h b/src/bacnet/version.h index 9026dec6..da399335 100644 --- a/src/bacnet/version.h +++ b/src/bacnet/version.h @@ -17,8 +17,8 @@ #define BACNET_VERSION(x,y,z) (((x)<<16)+((y)<<8)+(z)) #endif -#define BACNET_VERSION_TEXT "1.3.5" -#define BACNET_VERSION_CODE BACNET_VERSION(1,3,5) +#define BACNET_VERSION_TEXT "1.3.6" +#define BACNET_VERSION_CODE BACNET_VERSION(1,3,6) #define BACNET_VERSION_MAJOR ((BACNET_VERSION_CODE>>16)&0xFF) #define BACNET_VERSION_MINOR ((BACNET_VERSION_CODE>>8)&0xFF) #define BACNET_VERSION_MAINTENANCE (BACNET_VERSION_CODE&0xFF)