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!

This commit is contained in:
skarg
2013-10-11 14:08:23 +00:00
parent 7361bb4650
commit 670af1c84d
+2 -1
View File
@@ -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;