Blob Blame History Raw
diff --git a/src/dome/DomeCoreXeq.cpp b/src/dome/DomeCoreXeq.cpp
index f9cc9e86..06d442cc 100644
--- a/src/dome/DomeCoreXeq.cpp
+++ b/src/dome/DomeCoreXeq.cpp
@@ -2094,7 +2094,10 @@ int DomeCore::dome_chksumstatus(DomeReq &req) {
     }
 
     // modify the queue as needed
-    std::string namekey = lfn + "[#]" + pfn + "[#]" + chksumtype;
+    std::stringstream s; // encode checksum data in key
+    s << lfn << "[#]" << pfn + "[#]" << chksumtype << "[#]"
+      << lfn.length() << "[#]" << pfn.length() << "[#]" << chksumtype.length();
+    std::string namekey = s.str();
     std::vector<std::string> qualifiers;
 
     Url u(pfn);
diff --git a/src/dome/DomeGenQueue.cpp b/src/dome/DomeGenQueue.cpp
index 990f6676..caee2903 100644
--- a/src/dome/DomeGenQueue.cpp
+++ b/src/dome/DomeGenQueue.cpp
@@ -98,7 +98,7 @@ int GenPrioQueue::insertItem(GenPrioQueueItem_ptr item) {
     addToRunning(item);
   }
   else {
-    Log(Logger::Lvl4, domelogmask, domelogname, " WARNING: Tried to add item with status neither Waiting nor Running");
+    Log(Logger::Lvl4, domelogmask, domelogname, " WARNING: Tried to add item with status neither Waiting nor Running (status " << item->status << ")");
     return -1;
   }
 
@@ -173,19 +173,28 @@ bool GenPrioQueue::possibleToRun(GenPrioQueueItem_ptr item) {
 
 int GenPrioQueue::touchItemOrCreateNew(std::string namekey, GenPrioQueueItem::QStatus status, int priority, const std::vector<std::string> &qualifiers) {
   scoped_lock lock(*this);
-  Log(Logger::Lvl4, domelogmask, domelogname, " Touching new item to the queue with name: " << namekey << ", status: " << status <<
-      "priority: " << priority);
+  Log(Logger::Lvl4, domelogmask, domelogname, " Touch or create item with name: " << namekey
+      << ", status: " << status << ", priority: " << priority);
 
-  GenPrioQueueItem_ptr item = items[namekey];
+  std::map<std::string, boost::shared_ptr<GenPrioQueueItem> >::iterator it;
+  it = items.find(namekey);
 
   // is this a new item to add to the queue?
-  if(item == NULL) {
-    item = boost::make_shared<GenPrioQueueItem>();
+  if (it == items.end()) {
+    Log(Logger::Lvl4, domelogmask, domelogname, " Create new item with name: " << namekey
+        << ", status: " << status << ", priority: " << priority);
+
+    GenPrioQueueItem_ptr item = boost::make_shared<GenPrioQueueItem>();
     item->update(namekey, status, priority, qualifiers);
     insertItem(item);
   }
   // nope, but maybe I need to update it
   else {
+    GenPrioQueueItem_ptr item = it->second;
+    Log(Logger::Lvl4, domelogmask, domelogname, " Touch existing item with name: " << namekey
+        << ", status: " << item->status << " -> " << status
+        << ", priority: " << item->priority << " -> " << priority);
+
     updateAccessTime(item);
     if(status == GenPrioQueueItem::Running)
       clock_gettime(CLOCK_MONOTONIC, &item->accesstime_running);