(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.31 and 1.32

version 1.31, 2006/07/25 18:27:26 version 1.32, 2006/08/11 19:47:07
Line 29 
Line 29 
 // //
 //============================================================================== //==============================================================================
 // //
 // Author: Nitin Upasani, Hewlett-Packard Company (Nitin_Upasani@hp.com)  
 //  
 // Modified By: Carol Ann Krug Graves, Hewlett-Packard Company  
 //                (carolann_graves@hp.com)  
 //            : Yi Zhou, Hewlett-Packard Company (yi_zhou@hp.com)  
 //  
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
 #include <Pegasus/Common/Config.h> #include <Pegasus/Common/Config.h>
Line 58 
Line 52 
 // l10n // l10n
 #include <Pegasus/Common/MessageLoader.h> #include <Pegasus/Common/MessageLoader.h>
  
   PEGASUS_USING_STD;
   
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
 PEGASUS_USING_STD;  snmpIndicationHandler::snmpIndicationHandler()
   {
       PEG_METHOD_ENTER (TRC_IND_HANDLER,
           "snmpIndicationHandler::snmpIndicationHandler");
  
 #ifdef HPUX_EMANATE #ifdef HPUX_EMANATE
         static snmpDeliverTrap_emanate snmpTrap;      _snmpTrapSender = new snmpDeliverTrap_emanate();
 #elif defined (PEGASUS_USE_NET_SNMP) #elif defined (PEGASUS_USE_NET_SNMP)
         static snmpDeliverTrap_netsnmp snmpTrap;      _snmpTrapSender = new snmpDeliverTrap_netsnmp();
 #else #else
         static snmpDeliverTrap_stub snmpTrap;      _snmpTrapSender = new snmpDeliverTrap_stub();
 #endif #endif
  
 snmpIndicationHandler::snmpIndicationHandler()  
 {  
     PEG_METHOD_ENTER (TRC_IND_HANDLER,  
         "snmpIndicationHandler::snmpIndicationHandler");  
     PEG_METHOD_EXIT();     PEG_METHOD_EXIT();
 } }
  
Line 84 
Line 79 
  
     _repository = repository;     _repository = repository;
  
 #ifdef PEGASUS_USE_NET_SNMP      _snmpTrapSender->initialize();
     snmpTrap.initialize();  
 #endif  
  
     PEG_METHOD_EXIT();     PEG_METHOD_EXIT();
 } }
Line 96 
Line 89 
     PEG_METHOD_ENTER (TRC_IND_HANDLER,     PEG_METHOD_ENTER (TRC_IND_HANDLER,
         "snmpIndicationHandler::terminate");         "snmpIndicationHandler::terminate");
  
 #ifdef PEGASUS_USE_NET_SNMP      _snmpTrapSender->terminate();
     snmpTrap.terminate();  
 #endif  
  
     PEG_METHOD_EXIT();     PEG_METHOD_EXIT();
 } }
Line 108 
Line 99 
     PEG_METHOD_ENTER (TRC_IND_HANDLER,     PEG_METHOD_ENTER (TRC_IND_HANDLER,
         "snmpIndicationHandler::~snmpIndicationHandler");         "snmpIndicationHandler::~snmpIndicationHandler");
  
       delete _snmpTrapSender;
  
     PEG_METHOD_EXIT();     PEG_METHOD_EXIT();
 } }
Line 224 
Line 216 
             //             //
             //  Get snmpTrapOid from context             //  Get snmpTrapOid from context
             //             //
             try              if (context.contains(SnmpTrapOidContainer::NAME))
             {             {
                 SnmpTrapOidContainer trapContainer = context.get                 SnmpTrapOidContainer trapContainer = context.get
                     (SnmpTrapOidContainer::NAME);                     (SnmpTrapOidContainer::NAME);
  
                 trapOid = trapContainer.getSnmpTrapOid();                 trapOid = trapContainer.getSnmpTrapOid();
             }             }
             catch (Exception& e)              else
             {             {
                 // get trapOid from indication Class                 // get trapOid from indication Class
  
Line 298 
Line 290 
                 handler.getProperty(engineIDPos).getValue().get(engineID);                 handler.getProperty(engineIDPos).getValue().get(engineID);
             }             }
  
             snmpTrap.deliverTrap(              _snmpTrapSender->deliverTrap(
                 trapOid,                 trapOid,
                 securityName,                 securityName,
                 targetHost,                 targetHost,
Line 354 
Line 346 
     PEG_METHOD_EXIT();     PEG_METHOD_EXIT();
 } }
  
   PEGASUS_NAMESPACE_END
   
   PEGASUS_USING_PEGASUS;
   
 // This is the dynamic entry point into this dynamic module. The name of // This is the dynamic entry point into this dynamic module. The name of
 // this handler is "snmpIndicationHandler" which is appended to "PegasusCreateHandler_" // this handler is "snmpIndicationHandler" which is appended to "PegasusCreateHandler_"
 // to form a symbol name. This function is called by the HandlerTable // to form a symbol name. This function is called by the HandlerTable
 // to load this handler. // to load this handler.
  
 extern "C" PEGASUS_EXPORT CIMHandler*  extern "C" PEGASUS_EXPORT
     PegasusCreateHandler_snmpIndicationHandler() {  CIMHandler* PegasusCreateHandler_snmpIndicationHandler()
   {
     return new snmpIndicationHandler;     return new snmpIndicationHandler;
 } }
   
 PEGASUS_NAMESPACE_END  


Legend:
Removed from v.1.31  
changed lines
  Added in v.1.32

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2