When write-property to object-name property in example objects, no need to write the duplicate name again.

This commit is contained in:
skarg
2013-01-14 17:13:48 +00:00
parent af5d529001
commit adb69c524c
2 changed files with 3 additions and 6 deletions
+2 -3
View File
@@ -1522,15 +1522,14 @@ bool Device_Write_Property_Local(
&object_type, &object_instance)) {
if ((object_type == wp_data->object_type) &&
(object_instance == wp_data->object_instance)) {
/* okay to set my name as the same name */
/* writing same name to same object */
status = true;
} else {
status = false;
wp_data->error_class = ERROR_CLASS_PROPERTY;
wp_data->error_code = ERROR_CODE_DUPLICATE_NAME;
}
}
if (status) {
} else {
Device_Set_Object_Name(&value.type.Character_String);
}
}
+1 -3
View File
@@ -653,6 +653,7 @@ bool Multistate_Input_Write_Property(
&object_type, &object_instance)) {
if ((object_type == wp_data->object_type) &&
(object_instance == wp_data->object_instance)) {
/* writing same name to same object */
status = true;
} else {
status = false;
@@ -660,9 +661,6 @@ bool Multistate_Input_Write_Property(
wp_data->error_code = ERROR_CODE_DUPLICATE_NAME;
}
} else {
status = true;
}
if (status) {
status = Multistate_Input_Object_Name_Write(
wp_data->object_instance,
&value.type.Character_String,