From 5ecd707877afda3c4bc8a2e472add52b193d939e Mon Sep 17 00:00:00 2001
From: Daniele Kruse <dkruse@cern.ch>
Date: Fri, 26 Jun 2015 14:18:39 +0200
Subject: [PATCH] Corrected a typo in hpp filename and added content for
 OStoreDB::queue(const RetrieveToDirRequest& rqst)

---
 objectstore/Agent.cpp                                       | 2 +-
 objectstore/AgentRegister.cpp                               | 2 +-
 objectstore/DriveRegister.cpp                               | 2 +-
 objectstore/ProtocolBuffersAlgorithms.cpp                   | 2 +-
 ...lBuffersAlgorithms.hpp => ProtocolBuffersAlgorithms.hpp} | 0
 objectstore/RootEntry.cpp                                   | 2 +-
 objectstore/TapePool.cpp                                    | 2 +-
 scheduler/OStoreDB/OStoreDB.cpp                             | 6 +++++-
 8 files changed, 11 insertions(+), 7 deletions(-)
 rename objectstore/{ProtcolBuffersAlgorithms.hpp => ProtocolBuffersAlgorithms.hpp} (100%)

diff --git a/objectstore/Agent.cpp b/objectstore/Agent.cpp
index d857c14c50..10e36adc9e 100644
--- a/objectstore/Agent.cpp
+++ b/objectstore/Agent.cpp
@@ -20,7 +20,7 @@
 #include "AgentRegister.hpp"
 #include "RootEntry.hpp"
 #include "common/exception/Errnum.hpp"
-#include "ProtcolBuffersAlgorithms.hpp"
+#include "ProtocolBuffersAlgorithms.hpp"
 #include <string>
 #include <sstream>
 #include <iomanip>
diff --git a/objectstore/AgentRegister.cpp b/objectstore/AgentRegister.cpp
index cb258356c3..ce92b8a857 100644
--- a/objectstore/AgentRegister.cpp
+++ b/objectstore/AgentRegister.cpp
@@ -17,7 +17,7 @@
  */
 
 #include "AgentRegister.hpp"
-#include "ProtcolBuffersAlgorithms.hpp"
+#include "ProtocolBuffersAlgorithms.hpp"
 #include "GenericObject.hpp"
 
 cta::objectstore::AgentRegister::AgentRegister(Backend & os):
diff --git a/objectstore/DriveRegister.cpp b/objectstore/DriveRegister.cpp
index cbcda69978..f44f0dde28 100644
--- a/objectstore/DriveRegister.cpp
+++ b/objectstore/DriveRegister.cpp
@@ -17,7 +17,7 @@
  */
 
 #include "DriveRegister.hpp"
-#include "ProtcolBuffersAlgorithms.hpp"
+#include "ProtocolBuffersAlgorithms.hpp"
 #include "GenericObject.hpp"
 
 cta::objectstore::DriveRegister::DriveRegister(const std::string & address, Backend & os):
diff --git a/objectstore/ProtocolBuffersAlgorithms.cpp b/objectstore/ProtocolBuffersAlgorithms.cpp
index 79b1195efc..59a6590834 100644
--- a/objectstore/ProtocolBuffersAlgorithms.cpp
+++ b/objectstore/ProtocolBuffersAlgorithms.cpp
@@ -16,7 +16,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "ProtcolBuffersAlgorithms.hpp"
+#include "ProtocolBuffersAlgorithms.hpp"
 
 void cta::objectstore::serializers::removeString(::google::protobuf::RepeatedPtrField< ::std::string>* field, 
   const std::string & value) {
diff --git a/objectstore/ProtcolBuffersAlgorithms.hpp b/objectstore/ProtocolBuffersAlgorithms.hpp
similarity index 100%
rename from objectstore/ProtcolBuffersAlgorithms.hpp
rename to objectstore/ProtocolBuffersAlgorithms.hpp
diff --git a/objectstore/RootEntry.cpp b/objectstore/RootEntry.cpp
index 60524149f1..d3e6d90cc4 100644
--- a/objectstore/RootEntry.cpp
+++ b/objectstore/RootEntry.cpp
@@ -22,7 +22,7 @@
 #include "TapePool.hpp"
 #include "DriveRegister.hpp"
 #include <cxxabi.h>
-#include "ProtcolBuffersAlgorithms.hpp"
+#include "ProtocolBuffersAlgorithms.hpp"
 
 // construtor, when the backend store exists.
 // Checks the existence and correctness of the root entry
diff --git a/objectstore/TapePool.cpp b/objectstore/TapePool.cpp
index 53db02bf75..2c739acf60 100644
--- a/objectstore/TapePool.cpp
+++ b/objectstore/TapePool.cpp
@@ -18,7 +18,7 @@
 
 #include "TapePool.hpp"
 #include "GenericObject.hpp"
-#include "ProtcolBuffersAlgorithms.hpp"
+#include "ProtocolBuffersAlgorithms.hpp"
 #include "CreationLog.hpp"
 #include "Tape.hpp"
 
diff --git a/scheduler/OStoreDB/OStoreDB.cpp b/scheduler/OStoreDB/OStoreDB.cpp
index 48e8ed81bb..bbec9c3c32 100644
--- a/scheduler/OStoreDB/OStoreDB.cpp
+++ b/scheduler/OStoreDB/OStoreDB.cpp
@@ -37,6 +37,7 @@
 #include "ArchiveToDirRequest.hpp"
 #include "RetrieveToFileRequest.hpp"
 #include "TapeCopyLocation.hpp"
+#include "RetrieveToDirRequest.hpp"
 #include <algorithm>
 #include <stdlib.h>     /* srand, rand */
 #include <time.h>       /* time */
@@ -514,7 +515,10 @@ void OStoreDB::queue(const cta::RetrieveToFileRequest& rqst) {
 }
 
 void OStoreDB::queue(const RetrieveToDirRequest& rqst) {
-  throw exception::Exception("Not Implemented");
+  auto & retrieveToFileRequests = rqst.getRetrieveToFileRequests();
+  for(auto req=retrieveToFileRequests.begin(); req!=retrieveToFileRequests.end(); req++) {
+    queue(*req);
+  }
 }
 
 std::list<RetrieveFromTapeCopyRequest> OStoreDB::getRetrieveRequests(const std::string& vid) const {
-- 
GitLab