Bugzilla – Bug 140
NodeList::Connect vs TraceConnect for each node: bug?
Last modified: 2008-02-26 10:16:19 UTC
Please tell me if I am doing something wrong: for (NodeList::Iterator iter = NodeList::Begin (); iter != NodeList::End (); iter++) { Ptr<BenchNode> node = dynamic_cast<BenchNode*> (PeekPointer<Node> (*iter)); node->TraceConnect ("/devices/*/queue/dequeue", MakeCallback (&MonitorNeighbors)); } In this case, the MonitorNeighbor trace function gets called, but only for node 0, not for any other node. Changing to this line at the end of the for loop fixes the problem for me: NodeList::Connect ("/nodes/*/devices/*/queue/dequeue", MakeCallback (&MonitorNeighbors)); But I thought they were supposed to be equivalent? Am I misunderstanding the API, or have I found a bug?
I'm unable to reproduce this problem anymore, even using the same test case. Not sure what happened. I'll reopen if I can reproduce again.