From 26a61bcd5180cc388243ab69c3dcb83a96243c99 Mon Sep 17 00:00:00 2001 From: skarg Date: Fri, 15 Jun 2007 00:29:51 +0000 Subject: [PATCH] Corrected RPM tag number for decoding. --- bacnet-stack/rpm.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bacnet-stack/rpm.c b/bacnet-stack/rpm.c index 08b49ac9..a242b97e 100644 --- a/bacnet-stack/rpm.c +++ b/bacnet-stack/rpm.c @@ -135,6 +135,13 @@ int rpm_decode_object_end(uint8_t * apdu, unsigned apdu_len) } /* decode the object property portion of the service request only */ +/* BACnetPropertyReference ::= SEQUENCE { + propertyIdentifier [0] BACnetPropertyIdentifier, + propertyArrayIndex [1] Unsigned OPTIONAL + --used only with array datatype + -- if omitted with an array the entire array is referenced + } +*/ int rpm_decode_object_property(uint8_t * apdu, unsigned apdu_len, BACNET_PROPERTY_ID * object_property, int32_t * array_index) @@ -161,7 +168,7 @@ int rpm_decode_object_property(uint8_t * apdu, option_len = decode_tag_number_and_value(&apdu[len], &tag_number, &len_value_type); - if (tag_number == 2) { + if (tag_number == 1) { len += option_len; len += decode_unsigned(&apdu[len], len_value_type, &array_value);