]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
fix for bug https://savannah.cern.ch/bugs/?81527, ... and one more in the neighborhood
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 27 Apr 2011 07:42:30 +0000 (07:42 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 27 Apr 2011 07:42:30 +0000 (07:42 +0000)
HLT/BASE/AliHLTComponent.cxx

index b6deff040ca0f4fe4f13266d6190a458e89e15fd..046b6d405dff9a5af44cbbc130d579ce47275c64 100644 (file)
@@ -34,6 +34,7 @@ using namespace std;
 #include "AliHLTComponentHandler.h"
 #include "AliHLTMessage.h"
 #include "AliHLTCTPData.h"
+#include "AliHLTErrorGuard.h"
 #include "AliRawDataHeader.h"
 #include "TString.h"
 #include "TMath.h"
@@ -2004,7 +2005,8 @@ int AliHLTComponent::ProcessEvent( const AliHLTComponentEventData& evtData,
        HLTWarning("did not receive SOR, ignoring EOR");
       }
     }
-    if (indexComConfEvent>=0 || fEventType==gkAliEventTypeConfiguration) {
+    if (fEventType==gkAliEventTypeConfiguration) {
+      if (indexComConfEvent>=0) {
       TString cdbEntry;
       if (indexComConfEvent>=0 && fpInputBlocks[indexComConfEvent].fPtr!=NULL && fpInputBlocks[indexComConfEvent].fSize>0) {
        cdbEntry.Append(reinterpret_cast<const char*>(fpInputBlocks[indexComConfEvent].fPtr), fpInputBlocks[indexComConfEvent].fSize);
@@ -2014,8 +2016,12 @@ int AliHLTComponent::ProcessEvent( const AliHLTComponentEventData& evtData,
       if (tmpResult<0) {
        HLTWarning("reconfiguration of component %p (%s) failed with error code %d", this, GetComponentID(), tmpResult);
       }
+      } else {
+       ALIHLTERRORGUARD(1, "incomplete Configure event, missing parameter data block");
+      }
     }
-    if (indexUpdtDCSEvent>=0 || fEventType==gkAliEventTypeReadPreprocessor) {
+    if (fEventType==gkAliEventTypeReadPreprocessor) {
+      if (indexUpdtDCSEvent>=0) {
       TString modules;
       if (fpInputBlocks[indexUpdtDCSEvent].fPtr!=NULL && fpInputBlocks[indexUpdtDCSEvent].fSize>0) {
        modules.Append(reinterpret_cast<const char*>(fpInputBlocks[indexUpdtDCSEvent].fPtr), fpInputBlocks[indexUpdtDCSEvent].fSize);
@@ -2025,6 +2031,9 @@ int AliHLTComponent::ProcessEvent( const AliHLTComponentEventData& evtData,
       if (tmpResult<0) {
        HLTWarning("preprocessor update of component %p (%s) failed with error code %d", this, GetComponentID(), tmpResult);
       }
+      } else {
+       ALIHLTERRORGUARD(1, "incomplete ReadPreprocessor event, missing parameter data block");
+      }
     }
   } else {
     // processing function needs to be called if there are no input data