summaryrefslogtreecommitdiff
path: root/orkaudio/Reporting.cpp
diff options
context:
space:
mode:
authorHenri Herscher <henri@oreka.org>2006-03-02 16:11:12 +0000
committerHenri Herscher <henri@oreka.org>2006-03-02 16:11:12 +0000
commit6d301a8dadf98464952912db2646e68df15b347f (patch)
tree1f0f3bb33c567bfecbf1e302c657324bda2975e9 /orkaudio/Reporting.cpp
parent8dcf8fc31fca9820efe23b6aa82633624bbc15ff (diff)
OrkTrack can now ask for tape deletion
git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@189 09dcff7a-b715-0410-9601-b79a96267cd0
Diffstat (limited to 'orkaudio/Reporting.cpp')
-rw-r--r--orkaudio/Reporting.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/orkaudio/Reporting.cpp b/orkaudio/Reporting.cpp
index 799a3e0..308b58c 100644
--- a/orkaudio/Reporting.cpp
+++ b/orkaudio/Reporting.cpp
@@ -15,8 +15,10 @@
#include "Reporting.h"
#include "LogManager.h"
#include "messages/Message.h"
+#include "messages/TapeMsg.h"
#include "OrkClient.h"
#include "Daemon.h"
+#include "BatchProcessing.h"
Reporting Reporting::m_reportingSingleton;
@@ -67,16 +69,22 @@ void Reporting::ThreadHandler(void *args)
LOG4CXX_INFO(LOG.reportingLog, msgAsSingleLineString);
OrkHttpSingleLineClient c;
- SimpleResponseMsg srm;
+ TapeResponse tr;
bool success = false;
bool firstError = true;
while (!success)
{
- if (c.Execute((SyncMessage&)(*msgRef.get()), srm, CONFIG.m_trackerHostname, CONFIG.m_trackerTcpPort, CONFIG.m_trackerServicename, CONFIG.m_clientTimeout))
+ if (c.Execute((SyncMessage&)(*msgRef.get()), tr, CONFIG.m_trackerHostname, CONFIG.m_trackerTcpPort, CONFIG.m_trackerServicename, CONFIG.m_clientTimeout))
{
success = true;
+ if(tr.m_deleteTape)
+ {
+ LOG4CXX_INFO(LOG.reportingLog, "Registered tape for removal: " + audioTapeRef->GetIdentifier());
+ CStdString tapeFilename = audioTapeRef->GetFilename();
+ BatchProcessing::GetInstance()->TapeDropRegistration(tapeFilename);
+ }
}
else
{