]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
setting the output size to 0 if no output block descriptors are added
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 25 Oct 2010 21:47:21 +0000 (21:47 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 25 Oct 2010 21:47:21 +0000 (21:47 +0000)
HLT/BASE/AliHLTControlTask.cxx

index be5f1b5cb5714d0f388f12851c54831436db6c82..b1537b8d62fb2b7bd7e7ee4aa891a596ed70adf6 100644 (file)
@@ -137,12 +137,6 @@ int AliHLTControlTask::AliHLTControlEventComponent::GetEvent(const AliHLTCompone
   // see header file for class documentation
   if (!fpParent) return -ENODEV;
   const AliHLTControlTask* pParent=fpParent;
-  // return if no event has been set
-  if (pParent->fpData==NULL ||
-      pParent->fBlocks.size()==0) {
-    //HLTInfo("no control event to send");
-    return 0;
-  }
 
   AliHLTUInt32_t capacity=size;
   size=0;
@@ -150,6 +144,13 @@ int AliHLTControlTask::AliHLTControlEventComponent::GetEvent(const AliHLTCompone
     return -ENOSPC;
   }
 
+  // return if no event has been set
+  if (pParent->fpData==NULL ||
+      pParent->fBlocks.size()==0) {
+    //HLTInfo("no control event to send");
+    return 0;
+  }
+
   for (unsigned int i=0; i<pParent->fBlocks.size(); i++) {
     HLTDebug("publishing control block %s", DataType2Text(pParent->fBlocks[i].fDataType).c_str());
     memcpy(outputPtr+size, pParent->fBlocks[i].fPtr, pParent->fBlocks[i].fSize);