Changed Device_Object_List_Identifier() to use uint32_t for array_index since that is the size decoded in a ReadProperty request, and unsigned is not always 32-bit.
This commit is contained in:
@@ -512,7 +512,7 @@ unsigned Device_Object_List_Count(
|
||||
* @return True if found, else false.
|
||||
*/
|
||||
bool Device_Object_List_Identifier(
|
||||
unsigned array_index,
|
||||
uint32_t array_index,
|
||||
int *object_type,
|
||||
uint32_t * instance)
|
||||
{
|
||||
@@ -578,7 +578,7 @@ bool Device_Valid_Object_Name(
|
||||
bool found = false;
|
||||
int type = 0;
|
||||
uint32_t instance;
|
||||
unsigned max_objects = 0, i = 0;
|
||||
uint32_t max_objects = 0, i = 0;
|
||||
bool check_id = false;
|
||||
BACNET_CHARACTER_STRING object_name2;
|
||||
struct object_functions *pObject = NULL;
|
||||
@@ -808,10 +808,10 @@ int Device_Read_Property_Local(
|
||||
int len = 0; /* apdu len intermediate value */
|
||||
BACNET_BIT_STRING bit_string;
|
||||
BACNET_CHARACTER_STRING char_string;
|
||||
unsigned i = 0;
|
||||
uint32_t i = 0;
|
||||
int object_type = 0;
|
||||
uint32_t instance = 0;
|
||||
unsigned count = 0;
|
||||
uint32_t count = 0;
|
||||
uint8_t *apdu = NULL;
|
||||
struct object_functions *pObject = NULL;
|
||||
bool found = false;
|
||||
|
||||
@@ -1068,14 +1068,14 @@ unsigned Device_Object_List_Count(
|
||||
* @return True if found, else false.
|
||||
*/
|
||||
bool Device_Object_List_Identifier(
|
||||
unsigned array_index,
|
||||
uint32_t array_index,
|
||||
int *object_type,
|
||||
uint32_t * instance)
|
||||
{
|
||||
bool status = false;
|
||||
unsigned count = 0;
|
||||
unsigned object_index = 0;
|
||||
unsigned temp_index = 0;
|
||||
uint32_t count = 0;
|
||||
uint32_t object_index = 0;
|
||||
uint32_t temp_index = 0;
|
||||
struct object_functions *pObject = NULL;
|
||||
|
||||
/* array index zero is length - so invalid */
|
||||
@@ -1134,7 +1134,7 @@ bool Device_Valid_Object_Name(
|
||||
bool found = false;
|
||||
int type = 0;
|
||||
uint32_t instance;
|
||||
unsigned max_objects = 0, i = 0;
|
||||
uint32_t max_objects = 0, i = 0;
|
||||
bool check_id = false;
|
||||
BACNET_CHARACTER_STRING object_name2;
|
||||
struct object_functions *pObject = NULL;
|
||||
@@ -1369,10 +1369,10 @@ int Device_Read_Property_Local(
|
||||
int len = 0; /* apdu len intermediate value */
|
||||
BACNET_BIT_STRING bit_string = { 0 };
|
||||
BACNET_CHARACTER_STRING char_string = { 0 };
|
||||
unsigned i = 0;
|
||||
uint32_t i = 0;
|
||||
int object_type = 0;
|
||||
uint32_t instance = 0;
|
||||
unsigned count = 0;
|
||||
uint32_t count = 0;
|
||||
uint8_t *apdu = NULL;
|
||||
struct object_functions *pObject = NULL;
|
||||
bool found = false;
|
||||
|
||||
@@ -275,7 +275,7 @@ extern "C" {
|
||||
unsigned Device_Object_List_Count(
|
||||
void);
|
||||
bool Device_Object_List_Identifier(
|
||||
unsigned array_index,
|
||||
uint32_t array_index,
|
||||
int *object_type,
|
||||
uint32_t * instance);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user