From f97125d034530c17db1f2ad5d521697cd13cd71f Mon Sep 17 00:00:00 2001
From: Daniele Kruse <dkruse@cern.ch>
Date: Tue, 11 Aug 2015 14:55:01 +0200
Subject: [PATCH] Added few things for Vlado plus fixed small bugs

---
 objectstore/DriveRegister.cpp                                | 2 +-
 scheduler/LogicalLibrary.hpp                                 | 5 +++++
 tapeserver/castor/tape/tapeserver/client/ClientInterface.hpp | 2 +-
 .../castor/tape/tapeserver/daemon/DataTransferSession.cpp    | 4 ++--
 4 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/objectstore/DriveRegister.cpp b/objectstore/DriveRegister.cpp
index 8047e69b04..79787db613 100644
--- a/objectstore/DriveRegister.cpp
+++ b/objectstore/DriveRegister.cpp
@@ -67,7 +67,7 @@ void cta::objectstore::DriveRegister::garbageCollect(const std::string &presumed
 }
 
 
-void cta::objectstore::DriveRegister::addDrive(std::string driveName) {
+void cta::objectstore::DriveRegister::addDrive(std::string driveName) { //add logical library to the parameters
   checkPayloadWritable();
   // Check that we are not trying to duplicate a drive
   try {
diff --git a/scheduler/LogicalLibrary.hpp b/scheduler/LogicalLibrary.hpp
index e3ddef4864..c53e307c5d 100644
--- a/scheduler/LogicalLibrary.hpp
+++ b/scheduler/LogicalLibrary.hpp
@@ -56,6 +56,11 @@ struct LogicalLibrary  {
    */
   std::string name;
   
+  /**
+   * The state of the library online/offline
+   */  
+  bool online;
+  
   /**
    * The record of the entry's creation
    */
diff --git a/tapeserver/castor/tape/tapeserver/client/ClientInterface.hpp b/tapeserver/castor/tape/tapeserver/client/ClientInterface.hpp
index ae1224597e..ae5efb8850 100644
--- a/tapeserver/castor/tape/tapeserver/client/ClientInterface.hpp
+++ b/tapeserver/castor/tape/tapeserver/client/ClientInterface.hpp
@@ -54,7 +54,7 @@ public :
    */
   class RequestReport {
   public:
-    RequestReport(): transactionId(0),
+    RequestReport(): transactionId(""),
             connectDuration(0), sendRecvDuration(0) {}
     std::string transactionId;
     double connectDuration;
diff --git a/tapeserver/castor/tape/tapeserver/daemon/DataTransferSession.cpp b/tapeserver/castor/tape/tapeserver/daemon/DataTransferSession.cpp
index 905f7176e5..13e66c9c7d 100644
--- a/tapeserver/castor/tape/tapeserver/daemon/DataTransferSession.cpp
+++ b/tapeserver/castor/tape/tapeserver/daemon/DataTransferSession.cpp
@@ -88,7 +88,7 @@ castor::tape::tapeserver::daemon::Session::EndOfSessionAction
   lc.pushOrReplace(log::Param("thread", "MainThread"));
   // 2a) Get initial information from the client
   client::ClientProxy::RequestReport reqReport;
-  std::unique_ptr<cta::TapeMount> tapeMount(m_scheduler.getNextMount(m_driveConfig.getLogicalLibrary(), m_driveConfig.getUnitName()));
+  std::unique_ptr<cta::TapeMount> tapeMount(m_scheduler.getNextMount(m_driveConfig.getLogicalLibrary(), m_driveConfig.getUnitName())); //getNextMount throws not implemented exception
   m_volInfo.vid=tapeMount->getVid();
   m_volInfo.mountType=tapeMount->getMountType();
   m_volInfo.density=tapeMount->getDensity();
@@ -173,7 +173,7 @@ castor::tape::tapeserver::daemon::Session::EndOfSessionAction
     // We are now ready to put everything in motion. First step is to check
     // we get any concrete job to be done from the client (via the task injector)
     castor::utils::Timer timer;
-    if (rti.synchronousInjection()) {
+    if (rti.synchronousInjection()) {  //adapt the recall task injector (starting from synchronousInjection)
       // We got something to recall. Time to start the machinery
       trst.setWaitForInstructionsTime(timer.secs());
       rwd.startThread();
-- 
GitLab