Make sure RPM handler aborts if Device_Read_Property() returns -2 (because the current property by itself won't fit in the APDU).

This commit is contained in:
tbrennan3
2010-04-23 18:40:09 +00:00
parent 4163cac4cb
commit 040e6ed286
+3
View File
@@ -133,6 +133,9 @@ static int RPM_Encode_Property(
rpdata.application_data_len = sizeof(Temp_Buf);
len = Device_Read_Property(&rpdata);
if (len < 0) {
if ( len == -2 ) {
return 0; /* Ie, Abort */
}
/* error was returned - encode that for the response */
len =
rpm_ack_encode_apdu_object_property_error(&Temp_Buf[0],