--- a/tool/CommandDebug.cpp Thu Mar 11 14:29:43 2010 +0100
+++ b/tool/CommandDebug.cpp Thu Mar 11 15:03:52 2010 +0100
@@ -68,6 +68,7 @@
void CommandDebug::execute(const StringVector &args)
{
+ MasterIndexList masterIndices;
stringstream str;
int debugLevel;
@@ -87,9 +88,10 @@
throwInvalidUsageException(err);
}
+ masterIndices = getMasterIndices();
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::ReadWrite);
m.setDebug(debugLevel);