(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.4 and 1.11

version 1.4, 2002/03/21 23:00:08 version 1.11, 2002/07/31 22:05:08
Line 1 
Line 1 
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000, 2001 BMC Software, Hewlett Packard, IBM, The Open Group,  // Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM,
 // Tivoli Systems  // The Open Group, Tivoli Systems
 // //
 // Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
 // of this software and associated documentation files (the "Software"), to // of this software and associated documentation files (the "Software"), to
Line 23 
Line 23 
 // //
 // Author: Nitin Upasani, Hewlett-Packard Company (Nitin_Upasani@hp.com) // Author: Nitin Upasani, Hewlett-Packard Company (Nitin_Upasani@hp.com)
 // //
 // Modified By:  // Modified By: Carol Ann Krug Graves, Hewlett-Packard Company
   //                (carolann_graves@hp.com)
 // //
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
 #include <Pegasus/Common/Config.h> #include <Pegasus/Common/Config.h>
   #include <Pegasus/Common/PegasusVersion.h>
   
 #include <iostream> #include <iostream>
 #include <Pegasus/Handler/CIMHandler.h> #include <Pegasus/Handler/CIMHandler.h>
 #include <Pegasus/Repository/CIMRepository.h> #include <Pegasus/Repository/CIMRepository.h>
Line 79 
Line 82 
     {     {
         prop = indication.getProperty(i);         prop = indication.getProperty(i);
  
         if (prop)          if (!prop.isUninitialized())
         {         {
             String propName = prop.getName();             String propName = prop.getName();
             Uint32 propPos = indicationClass.findProperty(propName);             Uint32 propPos = indicationClass.findProperty(propName);
Line 87 
Line 90 
             {             {
             CIMProperty trapProp = indicationClass.getProperty(propPos);             CIMProperty trapProp = indicationClass.getProperty(propPos);
  
             if (trapProp.existsQualifier("MappingStrings"))  
             {  
                 qualifierPos = trapProp.findQualifier("MappingStrings");                 qualifierPos = trapProp.findQualifier("MappingStrings");
               if (qualifierPos != PEG_NOT_FOUND)
               {
                 trapQualifier = trapProp.getQualifier(qualifierPos);                 trapQualifier = trapProp.getQualifier(qualifierPos);
  
                 mapstr1.clear();                 mapstr1.clear();
Line 113 
Line 116 
                             propVALUEs.append(propValue);                             propVALUEs.append(propValue);
  
                             mapstr2 = mapstr1.subString(mapstr1.find("|")+2);                             mapstr2 = mapstr1.subString(mapstr1.find("|")+2);
                               mapstr2 = mapstr2.subString(0, mapstr2.size()-1);
                             propTYPEs.append(mapstr2);                             propTYPEs.append(mapstr2);
                         }                         }
                     }                     }
Line 134 
Line 138 
  
     if ((handler.findProperty("TrapDestination") != PEG_NOT_FOUND) &&     if ((handler.findProperty("TrapDestination") != PEG_NOT_FOUND) &&
         (handler.findProperty("SNMPVersion") != PEG_NOT_FOUND) &&         (handler.findProperty("SNMPVersion") != PEG_NOT_FOUND) &&
         (indication.findQualifier("TrapOid") != PEG_NOT_FOUND))          (indicationClass.findQualifier("MappingStrings") != PEG_NOT_FOUND))
     {     {
         String community, trapType, destination;   // from handler instance         String community, trapType, destination;   // from handler instance
         String trapOid;     // from indication instance          String trapOid;     // from indication Class
   
           trapOid = indicationClass.getQualifier(
               indicationClass.findQualifier("MappingStrings")).getValue().toString();
  
         trapOid = indication.getQualifier(          trapOid = trapOid.subString(trapOid.find("OID.IETF | SNMP.")+16);
             indication.findQualifier("TrapOid")).getValue().toString();  
  
         community = handler.getProperty(         community = handler.getProperty(
             handler.findProperty("SNMPCommunityName")).getValue().toString();             handler.findProperty("SNMPCommunityName")).getValue().toString();
Line 160 
Line 166 
             propTYPEs,             propTYPEs,
             propVALUEs);             propVALUEs);
     }     }
       else
           cout << "Invalid Indication" << endl;
 } }
  
 // 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


Legend:
Removed from v.1.4  
changed lines
  Added in v.1.11

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2