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

Diff for /pegasus/src/Pegasus/Handler/snmpIndicationHandler/tests/testclient/testSnmpHandler.cpp between version 1.21 and 1.22

version 1.21, 2010/12/22 12:19:07 version 1.22, 2011/01/07 11:26:05
Line 36 
Line 36 
 #include <Pegasus/General/Stopwatch.h> #include <Pegasus/General/Stopwatch.h>
 #include <Pegasus/Client/CIMClient.h> #include <Pegasus/Client/CIMClient.h>
 #include <Pegasus/Common/HostAddress.h> #include <Pegasus/Common/HostAddress.h>
   #ifdef PEGASUS_USE_NET_SNMP
 #include <net-snmp/net-snmp-config.h> #include <net-snmp/net-snmp-config.h>
 #include <net-snmp/net-snmp-includes.h> #include <net-snmp/net-snmp-includes.h>
   #endif
  
 PEGASUS_USING_PEGASUS; PEGASUS_USING_PEGASUS;
 PEGASUS_USING_STD; PEGASUS_USING_STD;
Line 157 
Line 159 
         CIMValue ((Uint16) snmpVersion)));         CIMValue ((Uint16) snmpVersion)));
     handlerInstance.addProperty (CIMProperty (CIMName ("PortNumber"),     handlerInstance.addProperty (CIMProperty (CIMName ("PortNumber"),
         CIMValue ((Uint32) PORT_NUMBER)));         CIMValue ((Uint32) PORT_NUMBER)));
   
   #ifdef PEGASUS_ENABLE_NET_SNMPV3
     if(snmpVersion == _SNMPV3_TRAP)     if(snmpVersion == _SNMPV3_TRAP)
     {     {
  
Line 267 
Line 271 
             free(encryptedSecurityPrivKey);             free(encryptedSecurityPrivKey);
         }         }
     }     }
   #endif // ifdef PEGASUS_ENABLE_NET_SNMPV3
  
     return client.createInstance(     return client.createInstance(
         PEGASUS_NAMESPACENAME_INTEROP, handlerInstance);         PEGASUS_NAMESPACENAME_INTEROP, handlerInstance);
Line 569 
Line 574 
     }     }
 #endif #endif
  
   #ifdef PEGASUS_ENABLE_NET_SNMPV3
     // create a snmp V3 trap handler.     // create a snmp V3 trap handler.
     try     try
     {     {
Line 625 
Line 631 
             throw;             throw;
         }         }
     }     }
 #  #endif // ifdef PEGASUS_ENABLE_NET_SNMPV3
 } }
  
 void _cleanup (CIMClient & client) void _cleanup (CIMClient & client)
Line 676 
Line 682 
     }     }
 #endif #endif
  
   #ifdef PEGASUS_ENABLE_NET_SNMPV3
     try     try
     {     {
         _deleteSubscriptionInstance (client, FILTER_NAME,         _deleteSubscriptionInstance (client, FILTER_NAME,
Line 690 
Line 697 
             throw;             throw;
         }         }
     }     }
   #endif
  
     try     try
     {     {
Line 743 
Line 751 
     }     }
 #endif #endif
  
   #ifdef PEGASUS_ENABLE_NET_SNMPV3
     try     try
     {     {
         _deleteHandlerInstance (client, SNMPV3_HANDLER_NAME);         _deleteHandlerInstance (client, SNMPV3_HANDLER_NAME);
Line 755 
Line 764 
             throw;             throw;
         }         }
     }     }
   #endif
 } }
  
 static void _testEnd(const String& uniqueID, const double elapsedTime) static void _testEnd(const String& uniqueID, const double elapsedTime)
Line 845 
Line 855 
         {         {
             receivedTrap2Count++;             receivedTrap2Count++;
         }         }
   #ifdef PEGASUS_ENABLE_NET_SNMPV3
         if (String::compare(line, trap3) == 0)         if (String::compare(line, trap3) == 0)
         {         {
             receivedTrap3Count++;             receivedTrap3Count++;
         }         }
   #endif
     }     }
  
     ifs.close();     ifs.close();
Line 863 
Line 875 
         {         {
             return (receivedTrap2Count);             return (receivedTrap2Count);
         }         }
   #ifdef PEGASUS_ENABLE_NET_SNMPV3
         case _SNMPV3_TRAP:         case _SNMPV3_TRAP:
         {         {
             return (receivedTrap3Count);             return (receivedTrap3Count);
         }         }
   #endif
         default:         default:
         {         {
             return (0);             return (0);
Line 1001 
Line 1015 
     indicationTrapV2SendCount = indicationTrapV1SendCount;     indicationTrapV2SendCount = indicationTrapV1SendCount;
 #endif #endif
  
   #ifdef PEGASUS_ENABLE_NET_SNMPV3
     indicationTrapV3SendCount =     indicationTrapV3SendCount =
         indicationSendCount * runClientThreadCount;         indicationSendCount * runClientThreadCount;
   #endif
  
     // calculate the timeout based on the total send count allowing     // calculate the timeout based on the total send count allowing
     // using the MSG_PER_SEC rate     // using the MSG_PER_SEC rate


Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2