Corrected the COV Subscription demo handler - every new subscription was getting index number 0
and overwriting the previous one. Thank you Janusz K.!
This commit is contained in:
@@ -234,8 +234,8 @@ static bool cov_list_subscribe(
|
||||
|
||||
/* existing? - match Object ID and Process ID */
|
||||
for (index = 0; index < MAX_COV_SUBCRIPTIONS; index++) {
|
||||
if ((COV_Subscriptions[index].valid) &&
|
||||
(COV_Subscriptions[index].monitoredObjectIdentifier.type ==
|
||||
if (COV_Subscriptions[index].valid) {
|
||||
if ((COV_Subscriptions[index].monitoredObjectIdentifier.type ==
|
||||
cov_data->monitoredObjectIdentifier.type) &&
|
||||
(COV_Subscriptions[index].monitoredObjectIdentifier.instance ==
|
||||
cov_data->monitoredObjectIdentifier.instance) &&
|
||||
@@ -252,6 +252,7 @@ static bool cov_list_subscribe(
|
||||
COV_Subscriptions[index].send_requested = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (first_invalid_index < 0) {
|
||||
first_invalid_index = index;
|
||||
|
||||
Reference in New Issue
Block a user