From 670af1c84dfa6636476ed18c35ba3725503e2af7 Mon Sep 17 00:00:00 2001 From: skarg Date: Fri, 11 Oct 2013 14:08:23 +0000 Subject: [PATCH] Added a check in COV Subscribe handling to also ensure that an existing subscription matches the SRC address. Without the check, funny things happen when there are subscribers with different addresses for the same object and process ID (there are lost subscriptions). Thank you, Nikola Jelic! --- bacnet-stack/demo/handler/h_cov.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bacnet-stack/demo/handler/h_cov.c b/bacnet-stack/demo/handler/h_cov.c index e2ba46b4..b598e232 100644 --- a/bacnet-stack/demo/handler/h_cov.c +++ b/bacnet-stack/demo/handler/h_cov.c @@ -260,7 +260,8 @@ static bool cov_list_subscribe( (COV_Subscriptions[index].monitoredObjectIdentifier.instance == cov_data->monitoredObjectIdentifier.instance) && (COV_Subscriptions[index].subscriberProcessIdentifier == - cov_data->subscriberProcessIdentifier)) { + cov_data->subscriberProcessIdentifier) && + bacnet_address_same(src, &COV_Subscriptions[index].dest)) { existing_entry = true; if (cov_data->cancellationRequest) { COV_Subscriptions[index].flag.valid = false;