Feature/apdu null length returned (#285)

* Add APDU as NULL to get BACnet type lengths.

* Fix bacapp copy test to succeed

* fix BACnet REAL and DOUBLE decode

* Add unit test for NULL APDU encoding for length

* Add unit tests for bacapp context

* refactor host-n-port to hostnport.c module

* fix BVLC decoder

* additional unit testing for bacapp

* include bacdevobjpropref module in builds

* simplify bacapp snprintf to be able to return length

* adjust compiler for variable-length arrays

* fix bug found by scan-build

Authored-by: Steve Karg <skarg@users.sourceforge.net>
This commit is contained in:
Steve Karg
2022-06-01 15:42:50 -05:00
committed by GitHub
parent 810bfefb34
commit f147283293
76 changed files with 3474 additions and 2791 deletions
+8
View File
@@ -586,6 +586,10 @@
<None Include="ASF\common\drivers\nvm\common_nvm.h">
<SubType>compile</SubType>
</None>
<Compile Include="..\..\src\bacnet\hostnport.c">
<SubType>compile</SubType>
<Link>bacnet-stack\hostnport.c</Link>
</Compile>
<Compile Include="..\..\src\bacnet\lighting.c">
<SubType>compile</SubType>
<Link>bacnet-stack\lighting.c</Link>
@@ -768,6 +772,10 @@
<SubType>compile</SubType>
<Link>bacnet-stack\bacdcode.c</Link>
</Compile>
<Compile Include="..\..\src\bacnet\bacdevobjpropref.c">
<SubType>compile</SubType>
<Link>bacnet-stack\bacdevobjpropref.c</Link>
</Compile>
<Compile Include="..\..\src\bacnet\bacerror.c">
<SubType>compile</SubType>
<Link>bacnet-stack\bacerror.c</Link>
+1 -1
View File
@@ -166,7 +166,7 @@ bool bacnet_name_write_unique(uint16_t offset,
bool status = false;
size_t length = 0;
uint8_t encoding = 0;
int duplicate_type = 0;
BACNET_OBJECT_TYPE duplicate_type = 0;
uint32_t duplicate_instance = 0;
length = characterstring_length(char_string);