Per 135-2016bl-2 and test BTL 9.20.1.8 Reading OPTIONAL Properties, if no optional properties are supported then an empty 'List of Results' shall be returned for the specified property.

This commit is contained in:
skarg
2017-03-20 15:15:30 +00:00
parent b51bd6bc5e
commit 9b2d696dda
+6 -15
View File
@@ -330,21 +330,12 @@ void handler_read_property_multiple(
RPM_Object_Property_Count(&property_list, RPM_Object_Property_Count(&property_list,
special_object_property); special_object_property);
if (property_count == 0) { if (property_count == 0) {
/* handle the error code - but use the special property */ /* this only happens with the OPTIONAL property */
len = /* 135-2016bl-2. Clarify ReadPropertyMultiple
RPM_Encode_Property(&Handler_Transmit_Buffer response on OPTIONAL when empty. */
[npdu_len], (uint16_t) apdu_len, MAX_APDU, /* If no optional properties are supported then
&rpmdata); an empty 'List of Results' shall be returned
if (len > 0) { for the specified property.*/
apdu_len += len;
} else {
#if PRINT_ENABLED
fprintf(stderr,
"RPM: Too full for special property!\r\n");
#endif
error = len;
goto RPM_FAILURE;
}
} else { } else {
for (index = 0; index < property_count; index++) { for (index = 0; index < property_count; index++) {
rpmdata.object_property = rpmdata.object_property =