From cc5c1f714f6766cb130fbef2d22a3b05b4b28a60 Mon Sep 17 00:00:00 2001 From: skarg Date: Wed, 2 Jan 2013 17:43:29 +0000 Subject: [PATCH] Fixed bug reported: Canceling Expired or Non-Existing Subsciptions does not return specified result.[bugs:#21]. Thank you, lo pe! --- bacnet-stack/demo/handler/h_cov.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/bacnet-stack/demo/handler/h_cov.c b/bacnet-stack/demo/handler/h_cov.c index 2bc3abf9..fffb49cf 100644 --- a/bacnet-stack/demo/handler/h_cov.c +++ b/bacnet-stack/demo/handler/h_cov.c @@ -305,12 +305,15 @@ static bool cov_list_subscribe( /* Out of resources */ *error_class = ERROR_CLASS_RESOURCES; *error_code = ERROR_CODE_NO_SPACE_TO_ADD_LIST_ELEMENT; + found = false; } else { - /* Unable to cancel request - valid object not subscribed */ - *error_class = ERROR_CLASS_SERVICES; - *error_code = ERROR_CODE_UNKNOWN_SUBSCRIPTION; + /* cancellationRequest - valid object not subscribed */ + /* From BACnet Standard 135-2010-13.14.2 + ...Cancellations that are issued for which no matching COV + context can be found shall succeed as if a context had + existed, returning 'Result(+)'.*/ + found = true; } - found = false; } return found;