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:
skarg
2010-10-12 01:17:50 +00:00
parent df2a5ca695
commit e9249b5b5e
29 changed files with 221 additions and 83 deletions
+6 -1
View File
@@ -1232,8 +1232,13 @@ static bool Device_Write_Property_Local(
len =
bacapp_decode_application_data(wp_data->application_data,
wp_data->application_data_len, &value);
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;
}
/* FIXME: len < application_data_len: more data? */
/* FIXME: len == 0: unable to decode? */
switch (wp_data->object_property) {
case PROP_OBJECT_IDENTIFIER:
status =