tool/CommandDownload.cpp
changeset 1870 0cee1fb7f0fd
parent 1869 14f634f5b613
child 1968 4f682084c643
--- a/tool/CommandDownload.cpp	Thu Mar 11 15:03:52 2010 +0100
+++ b/tool/CommandDownload.cpp	Thu Mar 11 15:17:25 2010 +0100
@@ -85,7 +85,6 @@
 void CommandDownload::execute(const StringVector &args)
 {
     stringstream strIndex, strSubIndex, err;
-	MasterIndexList masterIndices;
     ec_ioctl_slave_sdo_download_t data;
     unsigned int number;
     const DataType *dataType = NULL;
@@ -115,12 +114,7 @@
     }
     data.sdo_entry_subindex = number;
 
-	masterIndices = getMasterIndices();
-    if (masterIndices.size() != 1) {
-        err << getName() << " requires to select a single master!";
-        throwInvalidUsageException(err);
-    }
-    MasterDevice m(masterIndices.front());
+    MasterDevice m(getSingleMasterIndex());
     m.open(MasterDevice::ReadWrite);
     slaves = selectedSlaves(m);
     if (slaves.size() != 1) {