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 */
|
/* existing? - match Object ID and Process ID */
|
||||||
for (index = 0; index < MAX_COV_SUBCRIPTIONS; index++) {
|
for (index = 0; index < MAX_COV_SUBCRIPTIONS; index++) {
|
||||||
if ((COV_Subscriptions[index].valid) &&
|
if (COV_Subscriptions[index].valid) {
|
||||||
(COV_Subscriptions[index].monitoredObjectIdentifier.type ==
|
if ((COV_Subscriptions[index].monitoredObjectIdentifier.type ==
|
||||||
cov_data->monitoredObjectIdentifier.type) &&
|
cov_data->monitoredObjectIdentifier.type) &&
|
||||||
(COV_Subscriptions[index].monitoredObjectIdentifier.instance ==
|
(COV_Subscriptions[index].monitoredObjectIdentifier.instance ==
|
||||||
cov_data->monitoredObjectIdentifier.instance) &&
|
cov_data->monitoredObjectIdentifier.instance) &&
|
||||||
@@ -252,6 +252,7 @@ static bool cov_list_subscribe(
|
|||||||
COV_Subscriptions[index].send_requested = true;
|
COV_Subscriptions[index].send_requested = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (first_invalid_index < 0) {
|
if (first_invalid_index < 0) {
|
||||||
first_invalid_index = index;
|
first_invalid_index = index;
|
||||||
|
|||||||
Reference in New Issue
Block a user