From 6407f098bae922176428b2433cb5a887f1416601 Mon Sep 17 00:00:00 2001 From: petermcs Date: Mon, 14 Mar 2011 11:13:10 +0000 Subject: [PATCH] We don't need to check for available space in the APDU once we have encoded the last entry in the object list --- bacnet-stack/demo/object/device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bacnet-stack/demo/object/device.c b/bacnet-stack/demo/object/device.c index 7aa7209a..1f41d3d0 100644 --- a/bacnet-stack/demo/object/device.c +++ b/bacnet-stack/demo/object/device.c @@ -994,8 +994,8 @@ int Device_Read_Property_Local( object_type, instance); apdu_len += len; /* assume next one is the same size as this one */ - /* can we all fit into the APDU? */ - if ((apdu_len + len) >= MAX_APDU) { + /* can we all fit into the APDU? Don't check for last entry */ + if ((i != count) && (apdu_len + len) >= MAX_APDU) { /* Abort response */ rpdata->error_code = ERROR_CODE_ABORT_SEGMENTATION_NOT_SUPPORTED;