(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.1 and 1.2

version 1.1, 2006/03/14 22:39:31 version 1.2, 2006/03/15 20:27:39
Line 663 
Line 663 
     }     }
 } }
  
 int _beginTest(CIMClient& workClient,  void _receiveExpectedTraps(CIMClient& workClient,
     Uint32 indicationSendCount,     Uint32 indicationSendCount,
     Uint32 runClientThreadCount)     Uint32 runClientThreadCount)
 { {
  
 #ifdef PEGASUS_USE_NET_SNMP  
   
     // Stop snmptrapd process if it is running  
     _stopSnmptrapd();  
   
     // if trapLogFile exists, remove it  
     _removeTrapLogFile();  
   
     FILE * trapInfo;  
   
     try  
     {  
         _startSnmptrapd(&trapInfo);  
     }  
     catch (Exception & e)  
     {  
         cerr << e.getMessage() << endl;  
         return (-1);  
     }  
 #else  
     cerr << "Cannot create a trap receiver." << endl;  
     return (-1);  
 #endif  
   
     CIMClient * clientConnections = new CIMClient[runClientThreadCount];     CIMClient * clientConnections = new CIMClient[runClientThreadCount];
  
     // determine total number of indication send count     // determine total number of indication send count
Line 838 
Line 814 
        currentReceivedTrap1Count);        currentReceivedTrap1Count);
     PEGASUS_TEST_ASSERT(indicationSendCountTotal ==     PEGASUS_TEST_ASSERT(indicationSendCountTotal ==
        currentReceivedTrap2Count);        currentReceivedTrap2Count);
   }
   
   int _beginTest(CIMClient& workClient,
       Uint32 indicationSendCount,
       Uint32 runClientThreadCount)
   {
  
 #ifdef PEGASUS_USE_NET_SNMP #ifdef PEGASUS_USE_NET_SNMP
   
       // Stop snmptrapd process if it is running
       _stopSnmptrapd();
   
       // if trapLogFile exists, remove it
       _removeTrapLogFile();
   
       FILE * trapInfo;
   
       try
       {
           _startSnmptrapd(&trapInfo);
       }
       catch (Exception & e)
       {
           cerr << e.getMessage() << endl;
           return (-1);
       }
   
       // Extended for all snmp implementation
       _receiveExpectedTraps(workClient, indicationSendCount,
           runClientThreadCount);
   
     // Stop snmptrapd process if it is running and remove procIdFile     // Stop snmptrapd process if it is running and remove procIdFile
     _stopSnmptrapd();     _stopSnmptrapd();
  
     pclose(trapInfo);     pclose(trapInfo);
 #endif  
  
     // if error encountered then fail the test.     // if error encountered then fail the test.
     if (errorsEncountered.get())     if (errorsEncountered.get())
Line 857 
Line 861 
         cout << "+++++ passed all tests" << endl;         cout << "+++++ passed all tests" << endl;
     }     }
  
     return 0;      return (0);
   
   #else
       cerr << "Cannot create a trap receiver." << endl;
       return (-1);
   #endif
 } }
  
 int main (int argc, char** argv) int main (int argc, char** argv)


Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2