Fixed Device_Write_Property_Object_Name() to return WRITE_ACCESS_DENIED in case where an object name is not writable using BACnet protocol. (#927)
This commit is contained in:
@@ -1720,8 +1720,8 @@ static bool Device_Write_Property_Object_Name(
|
|||||||
if (Device_Valid_Object_Name(&value, &object_type, &object_instance)) {
|
if (Device_Valid_Object_Name(&value, &object_type, &object_instance)) {
|
||||||
if ((object_type == wp_data->object_type) &&
|
if ((object_type == wp_data->object_type) &&
|
||||||
(object_instance == wp_data->object_instance)) {
|
(object_instance == wp_data->object_instance)) {
|
||||||
/* writing same name to same object */
|
/* writing same name to same object - but is it writable? */
|
||||||
status = true;
|
status = Object_Write_Property(wp_data);
|
||||||
} else {
|
} else {
|
||||||
/* name already exists in some object */
|
/* name already exists in some object */
|
||||||
wp_data->error_class = ERROR_CLASS_PROPERTY;
|
wp_data->error_class = ERROR_CLASS_PROPERTY;
|
||||||
|
|||||||
@@ -1672,8 +1672,8 @@ static bool Device_Write_Property_Object_Name(
|
|||||||
if (Device_Valid_Object_Name(&value, &object_type, &object_instance)) {
|
if (Device_Valid_Object_Name(&value, &object_type, &object_instance)) {
|
||||||
if ((object_type == wp_data->object_type) &&
|
if ((object_type == wp_data->object_type) &&
|
||||||
(object_instance == wp_data->object_instance)) {
|
(object_instance == wp_data->object_instance)) {
|
||||||
/* writing same name to same object */
|
/* writing same name to same object - but is it writable? */
|
||||||
status = true;
|
status = Object_Write_Property(wp_data);
|
||||||
} else {
|
} else {
|
||||||
/* name already exists in some object */
|
/* name already exists in some object */
|
||||||
wp_data->error_class = ERROR_CLASS_PROPERTY;
|
wp_data->error_class = ERROR_CLASS_PROPERTY;
|
||||||
|
|||||||
@@ -238,8 +238,8 @@ static bool Device_Write_Property_Object_Name(
|
|||||||
if (Device_Valid_Object_Name(&value, &object_type, &object_instance)) {
|
if (Device_Valid_Object_Name(&value, &object_type, &object_instance)) {
|
||||||
if ((object_type == wp_data->object_type) &&
|
if ((object_type == wp_data->object_type) &&
|
||||||
(object_instance == wp_data->object_instance)) {
|
(object_instance == wp_data->object_instance)) {
|
||||||
/* writing same name to same object */
|
/* writing same name to same object - but is it writable? */
|
||||||
status = true;
|
status = Object_Write_Property(wp_data);
|
||||||
} else {
|
} else {
|
||||||
/* name already exists in some object */
|
/* name already exists in some object */
|
||||||
wp_data->error_class = ERROR_CLASS_PROPERTY;
|
wp_data->error_class = ERROR_CLASS_PROPERTY;
|
||||||
|
|||||||
@@ -205,8 +205,8 @@ static bool Device_Write_Property_Object_Name(
|
|||||||
if (Device_Valid_Object_Name(&value, &object_type, &object_instance)) {
|
if (Device_Valid_Object_Name(&value, &object_type, &object_instance)) {
|
||||||
if ((object_type == wp_data->object_type) &&
|
if ((object_type == wp_data->object_type) &&
|
||||||
(object_instance == wp_data->object_instance)) {
|
(object_instance == wp_data->object_instance)) {
|
||||||
/* writing same name to same object */
|
/* writing same name to same object - but is it writable? */
|
||||||
status = true;
|
status = Object_Write_Property(wp_data);
|
||||||
} else {
|
} else {
|
||||||
/* name already exists in some object */
|
/* name already exists in some object */
|
||||||
wp_data->error_class = ERROR_CLASS_PROPERTY;
|
wp_data->error_class = ERROR_CLASS_PROPERTY;
|
||||||
|
|||||||
@@ -1173,8 +1173,8 @@ static bool Device_Write_Property_Object_Name(
|
|||||||
if (Device_Valid_Object_Name(&value, &object_type, &object_instance)) {
|
if (Device_Valid_Object_Name(&value, &object_type, &object_instance)) {
|
||||||
if ((object_type == wp_data->object_type) &&
|
if ((object_type == wp_data->object_type) &&
|
||||||
(object_instance == wp_data->object_instance)) {
|
(object_instance == wp_data->object_instance)) {
|
||||||
/* writing same name to same object */
|
/* writing same name to same object - but is it writable? */
|
||||||
status = true;
|
status = Object_Write_Property(wp_data);
|
||||||
} else {
|
} else {
|
||||||
/* name already exists in some object */
|
/* name already exists in some object */
|
||||||
wp_data->error_class = ERROR_CLASS_PROPERTY;
|
wp_data->error_class = ERROR_CLASS_PROPERTY;
|
||||||
|
|||||||
@@ -1282,8 +1282,8 @@ static bool Device_Write_Property_Object_Name(
|
|||||||
if (Device_Valid_Object_Name(&value, &object_type, &object_instance)) {
|
if (Device_Valid_Object_Name(&value, &object_type, &object_instance)) {
|
||||||
if ((object_type == wp_data->object_type) &&
|
if ((object_type == wp_data->object_type) &&
|
||||||
(object_instance == wp_data->object_instance)) {
|
(object_instance == wp_data->object_instance)) {
|
||||||
/* writing same name to same object */
|
/* writing same name to same object - but is it writable? */
|
||||||
status = true;
|
status = Object_Write_Property(wp_data);
|
||||||
} else {
|
} else {
|
||||||
/* name already exists in some object */
|
/* name already exists in some object */
|
||||||
wp_data->error_class = ERROR_CLASS_PROPERTY;
|
wp_data->error_class = ERROR_CLASS_PROPERTY;
|
||||||
|
|||||||
@@ -1954,8 +1954,8 @@ static bool Device_Write_Property_Object_Name(
|
|||||||
if (Device_Valid_Object_Name(&value, &object_type, &object_instance)) {
|
if (Device_Valid_Object_Name(&value, &object_type, &object_instance)) {
|
||||||
if ((object_type == wp_data->object_type) &&
|
if ((object_type == wp_data->object_type) &&
|
||||||
(object_instance == wp_data->object_instance)) {
|
(object_instance == wp_data->object_instance)) {
|
||||||
/* writing same name to same object */
|
/* writing same name to same object - but is it writable? */
|
||||||
status = true;
|
status = Object_Write_Property(wp_data);
|
||||||
} else {
|
} else {
|
||||||
/* name already exists in some object */
|
/* name already exists in some object */
|
||||||
wp_data->error_class = ERROR_CLASS_PROPERTY;
|
wp_data->error_class = ERROR_CLASS_PROPERTY;
|
||||||
|
|||||||
Reference in New Issue
Block a user