Fixed error-code returned when an object does not support WriteProperty but has properties that are known. (#912)
This commit is contained in:
@@ -2017,8 +2017,17 @@ bool Device_Write_Property(BACNET_WRITE_PROPERTY_DATA *wp_data)
|
||||
Device_Write_Property_Store(wp_data);
|
||||
}
|
||||
} else {
|
||||
wp_data->error_class = ERROR_CLASS_PROPERTY;
|
||||
wp_data->error_code = ERROR_CODE_WRITE_ACCESS_DENIED;
|
||||
if (Device_Objects_Property_List_Member(
|
||||
wp_data->object_type, wp_data->object_instance,
|
||||
wp_data->object_property)) {
|
||||
/* this property is not writable */
|
||||
wp_data->error_class = ERROR_CLASS_PROPERTY;
|
||||
wp_data->error_code = ERROR_CODE_WRITE_ACCESS_DENIED;
|
||||
} else {
|
||||
/* this property is not supported */
|
||||
wp_data->error_class = ERROR_CLASS_PROPERTY;
|
||||
wp_data->error_code = ERROR_CODE_UNKNOWN_PROPERTY;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
wp_data->error_class = ERROR_CLASS_OBJECT;
|
||||
|
||||
Reference in New Issue
Block a user