(file) Return to snmpIndicationHandler.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Handler / snmpIndicationHandler

Diff for /pegasus/src/Pegasus/Handler/snmpIndicationHandler/snmpIndicationHandler.cpp between version 1.36 and 1.37

version 1.36, 2007/04/10 20:31:14 version 1.37, 2007/05/25 20:48:46
Line 123 
Line 123 
  
     try     try
     {     {
           PEG_TRACE ((TRC_INDICATION_GENERATION, Tracer::LEVEL3,
               "snmpIndicationHandler %s:%s.%s processing %s Indication",
              (const char*)(nameSpace.getCString()),
              (const char*)(handler.getClassName().getString().getCString()),
              (const char*)(handler.getProperty(
              handler.findProperty(PEGASUS_PROPERTYNAME_NAME)).
              getValue().toString().getCString()),
              (const char*)(indication.getClassName().getString().
              getCString())));
         CIMClass indicationClass = _repository->getClass(         CIMClass indicationClass = _repository->getClass(
             nameSpace, indication.getClassName(), false, true,             nameSpace, indication.getClassName(), false, true,
             false, CIMPropertyList());             false, CIMPropertyList());
Line 216 
Line 225 
             handler.findProperty(CIMName("SNMPSecurityName"));             handler.findProperty(CIMName("SNMPSecurityName"));
         Uint32 engineIDPos = handler.findProperty(CIMName("SNMPEngineID"));         Uint32 engineIDPos = handler.findProperty(CIMName("SNMPEngineID"));
  
         if ((targetHostPos != PEG_NOT_FOUND) &&          if (targetHostPos == PEG_NOT_FOUND)
             (targetHostFormatPos != PEG_NOT_FOUND) &&          {
             (snmpVersionPos != PEG_NOT_FOUND))              PEG_TRACE((TRC_DISCARDED_DATA, Tracer::LEVEL3,
                   "Target host is not set for IndicationHandlerSNMPMapper %s"
                   " Indication.",
                   (const char*)(indication.getClassName().getString().
                   getCString())));
               PEG_METHOD_EXIT();
               throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED, MessageLoaderParms(
                   "Handler.snmpIndicationHandler.snmpIndicationHandler."
                   "INVALID_SNMP_INSTANCE",
                   "Invalid IndicationHandlerSNMPMapper instance"));
           }
           if (targetHostFormatPos == PEG_NOT_FOUND)
           {
               PEG_TRACE((TRC_DISCARDED_DATA, Tracer::LEVEL3,
                   "Target host format is not set for IndicationHandlerSNMPMapper"
                   " %s Indication.",
                   (const char*)(indication.getClassName().getString().
                   getCString())));
               PEG_METHOD_EXIT();
               throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED, MessageLoaderParms(
                   "Handler.snmpIndicationHandler.snmpIndicationHandler."
                   "INVALID_SNMP_INSTANCE",
                   "Invalid IndicationHandlerSNMPMapper instance"));
           }
           if (snmpVersionPos == PEG_NOT_FOUND)
           {
               PEG_TRACE((TRC_DISCARDED_DATA, Tracer::LEVEL3,
                   "SNMP Version is not set for IndicationHandlerSNMPMapper %s"
                   " Indication.",
                   (const char*)(indication.getClassName().getString().
                   getCString())));
               PEG_METHOD_EXIT();
               throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED, MessageLoaderParms(
                   "Handler.snmpIndicationHandler.snmpIndicationHandler."
                   "INVALID_SNMP_INSTANCE",
                   "Invalid IndicationHandlerSNMPMapper instance"));
           }
           else
         {         {
             // properties from the handler instance             // properties from the handler instance
             String targetHost;             String targetHost;
Line 341 
Line 387 
                 handler.getProperty(engineIDPos).getValue().get(engineID);                 handler.getProperty(engineIDPos).getValue().get(engineID);
             }             }
  
               PEG_TRACE ((TRC_INDICATION_GENERATION, Tracer::LEVEL3,
                  "snmpIndicationHandler sending %s Indication trap %s to target"
                  " host %s target port %d",
                  (const char*)(indication.getClassName().getString().
                  getCString()),
                  (const char*)(trapOid.getCString()),
                  (const char*)(targetHost.getCString()),portNumber));
             _snmpTrapSender->deliverTrap(             _snmpTrapSender->deliverTrap(
                 trapOid,                 trapOid,
                 securityName,                 securityName,
Line 353 
Line 406 
                 propOIDs,                 propOIDs,
                 propTYPEs,                 propTYPEs,
                 propVALUEs);                 propVALUEs);
         }  
         else          PEG_TRACE ((TRC_INDICATION_GENERATION, Tracer::LEVEL3,
         {             "%s Indication trap %s sent to target host %s target port %d "
             PEG_TRACE_CSTRING(TRC_IND_HANDLER, Tracer::LEVEL4,             "successfully",
                 "Invalid IndicationHandlerSNMPMapper instance.");             (const char*)(indication.getClassName().getString().getCString()),
             PEG_METHOD_EXIT();             (const char*)(trapOid.getCString()),
             throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED, MessageLoaderParms(             (const char*)(targetHost.getCString()),portNumber));
                 "Handler.snmpIndicationHandler.snmpIndicationHandler."  
                     "INVALID_SNMP_INSTANCE",  
                 "Invalid IndicationHandlerSNMPMapper instance"));  
         }         }
     }     }
     catch (CIMException& c)     catch (CIMException& c)
Line 389 
Line 439 
                 "FAILED_TO_DELIVER_TRAP",                 "FAILED_TO_DELIVER_TRAP",
             "Failed to deliver trap."));             "Failed to deliver trap."));
     }     }
   
     PEG_METHOD_EXIT();     PEG_METHOD_EXIT();
 } }
  


Legend:
Removed from v.1.36  
changed lines
  Added in v.1.37

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2