View Issue Details

IDProjectCategoryView StatusLast Update
0000120.NET APIImplementation Bugpublic2008-05-10 08:50
ReporterRandy Armstrong Assigned ToRandy Armstrong  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Summary0000120: RemoveItems returns incorrect handles
Description

My input handles to the subscription.RemoveItems method are:

ClientHandle = it is an object of type {MySubscriptionItem}, not null
ServerHandle =it is an object of type int and its value = 2

After the successful removal, the result of the handles in the IdentifiedResult object are not null, there values are:

ClientHandle = 2, type int
ServerHandle = 1002, type int

TagsNo tags attached.

Activities

Randy Armstrong

2007-02-28 23:22

administrator   ~0000185

A bug in OpcCom.Da.Subscription.RemoveItems.

Fixed with the following code:

// process results.
IdentifiedResult[] results = new IdentifiedResult[itemIDs.Length];

ArrayList itemsToRemove = new ArrayList(itemIDs.Length);

for (int ii = 0; ii < itemIDs.Length; ii++)
{
results[ii] = new IdentifiedResult(itemIDs[ii]);

results[ii].ResultID       = OpcCom.Interop.GetResultID(errors[ii]);
results[ii].DiagnosticInfo = null;

// flag item for removal from local list.
if (results[ii].ResultID.Succeeded())
{
    itemsToRemove.Add(results[ii].ClientHandle);
}

}

// apply filter to results.
lock (m_items)
{
results = (IdentifiedResult[])m_items.ApplyFilters(m_filters, results);

// remove item from local list.
foreach (int clientHandle in itemsToRemove)
{
    m_items[clientHandle] = null;
}

return results;

}

Randy Armstrong

2008-05-10 08:50

administrator   ~0000696

Will be part of Release 2.00.101

Issue History

Date Modified Username Field Change
2007-02-28 23:21 Randy Armstrong New Issue
2007-02-28 23:21 Randy Armstrong Status new => assigned
2007-02-28 23:21 Randy Armstrong Assigned To => Randy Armstrong
2007-02-28 23:22 Randy Armstrong Status assigned => resolved
2007-02-28 23:22 Randy Armstrong Resolution open => fixed
2007-02-28 23:22 Randy Armstrong Note Added: 0000185
2007-02-28 23:24 Randy Armstrong Status resolved => confirmed
2008-05-10 08:50 Randy Armstrong Status confirmed => resolved
2008-05-10 08:50 Randy Armstrong Note Added: 0000696