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:
@@ -466,8 +466,12 @@ bool Trend_Log_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;
|
||||
}
|
||||
switch (wp_data->object_property) {
|
||||
case PROP_ENABLE:
|
||||
status =
|
||||
|
||||
Reference in New Issue
Block a user