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

Diff for /pegasus/src/Pegasus/Handler/snmpIndicationHandler/snmpDeliverTrap_emanate.cpp between version 1.20 and 1.23

version 1.20, 2005/02/14 04:37:20 version 1.23, 2006/08/11 19:47:07
Line 1 
Line 1 
 //%2005////////////////////////////////////////////////////////////////////////  //%2006////////////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
 // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
Line 8 
Line 8 
 // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.; // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 // EMC Corporation; VERITAS Software Corporation; The Open Group. // EMC Corporation; VERITAS Software Corporation; The Open Group.
   // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
   // EMC Corporation; Symantec Corporation; The Open Group.
 // //
 // 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 27 
Line 29 
 // //
 //============================================================================== //==============================================================================
 // //
 // Author: Nitin Upasani, Hewlett-Packard Company (Nitin_Upasani@hp.com)  
 //  
 // Modified By: Yi Zhou, Hewlett-Packard Company (yi_zhou@hp.com)  
 //  
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
 #include <Pegasus/Common/System.h> #include <Pegasus/Common/System.h>
Line 86 
Line 84 
  
 snmpDeliverTrap_emanate::snmpDeliverTrap_emanate() snmpDeliverTrap_emanate::snmpDeliverTrap_emanate()
 { {
     //  
     // Initialize Subagent and establish comunication with the Master Agent  
     //  
     initialize();  
 } }
  
 snmpDeliverTrap_emanate::~snmpDeliverTrap_emanate() snmpDeliverTrap_emanate::~snmpDeliverTrap_emanate()
 { {
     //  
     // Close the connection to the Master Agent and shut down the  
     // Subagent  
     //  
     EndSubagent();  
 } }
  
  
Line 130 
Line 119 
     }     }
 } }
  
   void snmpDeliverTrap_emanate::terminate()
   {
       //
       // Close the connection to the Master Agent and shut down the
       // Subagent
       //
       EndSubagent();
   }
   
  
 void snmpDeliverTrap_emanate::deliverTrap( void snmpDeliverTrap_emanate::deliverTrap(
         const String& trapOid,         const String& trapOid,
Line 607 
Line 605 
     struct hostent *targetHostInfo;     struct hostent *targetHostInfo;
     struct in_addr in;     struct in_addr in;
  
 #ifdef PEGASUS_OS_SOLARIS  #if defined(PEGASUS_OS_LINUX)
 #define HOSTENT_BUFF_SIZE       8192          char hostEntryBuffer[8192];
     char                        buf[HOSTENT_BUFF_SIZE];          struct hostent hostEntryStruct;
     struct hostent              h_result;          int hostEntryErrno;
     int                         h_errorp;  
     targetHostInfo=gethostbyname_r(hostName, &h_result, buff,          gethostbyname_r(
                                         HOSTENT_BUFF_SIZE, &h_errorp);              hostName,
               &hostEntryStruct,
               hostEntryBuffer,
               sizeof(hostEntryBuffer),
               &targetHostInfo,
               &hostEntryErrno);
   #elif defined(PEGASUS_OS_SOLARIS)
           char hostEntryBuffer[8192];
           struct hostent hostEntryStruct;
           int hostEntryErrno;
   
           targetHostInfo = gethostbyname_r(
               (char *)hostName,
               &hostEntryStruct,
               hostEntryBuffer,
               sizeof(hostEntryBuffer),
               &hostEntryErrno);
 #else #else
     targetHostInfo = gethostbyname(hostName);     targetHostInfo = gethostbyname(hostName);
 #endif #endif


Legend:
Removed from v.1.20  
changed lines
  Added in v.1.23

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2