Enabled BACnetARRAY checking when using proplist.c and added to apps/epics (#823)

This commit is contained in:
Steve Karg
2024-10-23 13:54:48 -05:00
committed by GitHub
parent d3de5c9491
commit dcf79b038f
15 changed files with 421 additions and 297 deletions
+9 -2
View File
@@ -421,7 +421,16 @@ bool Schedule_Write_Property(BACNET_WRITE_PROPERTY_DATA *wp_data)
bool status = false; /* return value */
int len;
BACNET_APPLICATION_DATA_VALUE value = { 0 };
bool is_array;
/* only array properties can have array options */
is_array = property_list_bacnet_array_member(
wp_data->object_type, wp_data->object_property);
if (!is_array && (wp_data->array_index != BACNET_ARRAY_ALL)) {
wp_data->error_class = ERROR_CLASS_PROPERTY;
wp_data->error_code = ERROR_CODE_PROPERTY_IS_NOT_AN_ARRAY;
return false;
}
/* decode the some of the request */
len = bacapp_decode_application_data(
wp_data->application_data, wp_data->application_data_len, &value);
@@ -432,12 +441,10 @@ bool Schedule_Write_Property(BACNET_WRITE_PROPERTY_DATA *wp_data)
wp_data->error_code = ERROR_CODE_VALUE_OUT_OF_RANGE;
return false;
}
object_index = Schedule_Instance_To_Index(wp_data->object_instance);
if (object_index >= MAX_SCHEDULES) {
return false;
}
switch ((int)wp_data->object_property) {
case PROP_OUT_OF_SERVICE:
status = write_property_type_valid(