From 9b2d696ddab88fac500a0169d36b38bc3274d237 Mon Sep 17 00:00:00 2001 From: skarg Date: Mon, 20 Mar 2017 15:15:30 +0000 Subject: [PATCH] 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. --- bacnet-stack/demo/handler/h_rpm.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/bacnet-stack/demo/handler/h_rpm.c b/bacnet-stack/demo/handler/h_rpm.c index 66bae9a7..b35f1ac2 100644 --- a/bacnet-stack/demo/handler/h_rpm.c +++ b/bacnet-stack/demo/handler/h_rpm.c @@ -330,21 +330,12 @@ void handler_read_property_multiple( RPM_Object_Property_Count(&property_list, special_object_property); if (property_count == 0) { - /* handle the error code - but use the special property */ - len = - RPM_Encode_Property(&Handler_Transmit_Buffer - [npdu_len], (uint16_t) apdu_len, MAX_APDU, - &rpmdata); - if (len > 0) { - apdu_len += len; - } else { -#if PRINT_ENABLED - fprintf(stderr, - "RPM: Too full for special property!\r\n"); -#endif - error = len; - goto RPM_FAILURE; - } + /* this only happens with the OPTIONAL property */ + /* 135-2016bl-2. Clarify ReadPropertyMultiple + response on OPTIONAL when empty. */ + /* If no optional properties are supported then + an empty 'List of Results' shall be returned + for the specified property.*/ } else { for (index = 0; index < property_count; index++) { rpmdata.object_property =