Added test for a decoding problem where the stack is unable to decode something, and retrofitted into WriteProperty for each of the demo objects by returning an Error, Out of Range.
This commit is contained in:
@@ -939,7 +939,12 @@ bool Load_Control_Write_Property(
|
||||
bacapp_decode_application_data(wp_data->application_data,
|
||||
wp_data->application_data_len, &value);
|
||||
/* FIXME: len < application_data_len: more data? */
|
||||
/* FIXME: len == 0: unable to decode? */
|
||||
if (len < 0) {
|
||||
/* error while decoding - a value larger than we can handle */
|
||||
wp_data->error_class = ERROR_CLASS_PROPERTY;
|
||||
wp_data->error_code = ERROR_CODE_VALUE_OUT_OF_RANGE;
|
||||
return false;
|
||||
}
|
||||
object_index = Load_Control_Instance_To_Index(wp_data->object_instance);
|
||||
switch (wp_data->object_property) {
|
||||
case PROP_REQUESTED_SHED_LEVEL:
|
||||
|
||||
Reference in New Issue
Block a user