--- a/tool/CommandPdos.cpp Thu Mar 11 14:29:43 2010 +0100
+++ b/tool/CommandPdos.cpp Thu Mar 11 15:03:52 2010 +0100
@@ -91,6 +91,7 @@
void CommandPdos::execute(const StringVector &args)
{
+ MasterIndexList masterIndices;
SlaveList slaves;
SlaveList::const_iterator si;
bool showHeader, multiMaster;
@@ -101,10 +102,11 @@
throwInvalidUsageException(err);
}
- multiMaster = getMasterIndices().size() > 1;
+ masterIndices = getMasterIndices();
+ multiMaster = masterIndices.size() > 1;
MasterIndexList::const_iterator mi;
- for (mi = getMasterIndices().begin();
- mi != getMasterIndices().end(); mi++) {
+ for (mi = masterIndices.begin();
+ mi != masterIndices.end(); mi++) {
MasterDevice m(*mi);
m.open(MasterDevice::Read);
slaves = selectedSlaves(m);