diff --git a/bacnet-stack/demo/handler/h_rp.c b/bacnet-stack/demo/handler/h_rp.c index aedbe198..870b2b00 100644 --- a/bacnet-stack/demo/handler/h_rp.c +++ b/bacnet-stack/demo/handler/h_rp.c @@ -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");