tool/CommandMaster.cpp
changeset 1869 14f634f5b613
parent 1858 4d4aa4c0fc1e
child 1956 f461dc0d145a
--- a/tool/CommandMaster.cpp	Thu Mar 11 14:29:43 2010 +0100
+++ b/tool/CommandMaster.cpp	Thu Mar 11 15:03:52 2010 +0100
@@ -67,6 +67,7 @@
 
 void CommandMaster::execute(const StringVector &args)
 {
+	MasterIndexList masterIndices;
     ec_ioctl_master_t data;
     stringstream err;
     unsigned int i, j;
@@ -79,9 +80,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::Read);
         m.getMaster(&data);