diff -r 489ea0becd74 -r 14f634f5b613 tool/CommandStates.cpp --- a/tool/CommandStates.cpp Thu Mar 11 14:29:43 2010 +0100 +++ b/tool/CommandStates.cpp Thu Mar 11 15:03:52 2010 +0100 @@ -68,6 +68,7 @@ void CommandStates::execute(const StringVector &args) { + MasterIndexList masterIndices; SlaveList slaves; SlaveList::const_iterator si; stringstream err; @@ -98,9 +99,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); slaves = selectedSlaves(m);