When reporting abort for apdu exceeding the maximum the requester can accomodate we need to set the error code up as read property processing may have overwritten the default by then.

This commit is contained in:
petermcs
2011-03-14 11:11:09 +00:00
parent 020c983478
commit e48aab8ebb
+4 -1
View File
@@ -125,7 +125,10 @@ void handler_read_property(
[npdu_len + apdu_len]);
apdu_len += len;
if (apdu_len > service_data->max_resp) {
/* too big for the sender - send an abort */
/* too big for the sender - send an abort
* Setting of error code needed here as read property processing may
* have overriden the default set at start */
rpdata.error_code = ERROR_CODE_ABORT_SEGMENTATION_NOT_SUPPORTED;
len = BACNET_STATUS_ABORT;
#if PRINT_ENABLED
fprintf(stderr, "RP: Message too large.\n");