(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.11.12.3 and 1.14

version 1.11.12.3, 2003/08/14 11:55:42 version 1.14, 2003/08/12 21:34:04
Line 245 
Line 245 
  
     }     }
  
     switch (targetHostFormat)  
     {  
         case _HOST_NAME:  
         {  
             char * ipAddr = _getIPAddress(trap_dest);  
   
             if (ipAddr == NULL)  
             {  
   
               // l10n  
   
               // throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED,  
               //   _MSG_DESTINATION_NOT_FOUND);  
   
               throw PEGASUS_CIM_EXCEPTION_L (CIM_ERR_FAILED,  
                                              MessageLoaderParms(_MSG_DESTINATION_NOT_FOUND_KEY,  
                                                                 _MSG_DESTINATION_NOT_FOUND));  
   
             }  
             global_ti.t_ipAddr = inet_addr(trap_dest);  
             break;  
         }  
         case _IPV4_ADDRESS:  
         {  
             global_ti.t_ipAddr = inet_addr(trap_dest);  
             break;  
         }  
         default:  
         {  
   
           // l10n  
   
           // throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED,  
           // _MSG_TARGETHOSTFORMAT_NOT_SUPPORTED);  
   
           throw PEGASUS_CIM_EXCEPTION_L (CIM_ERR_NOT_SUPPORTED,  
                                          MessageLoaderParms(_MSG_TARGETHOSTFORMAT_NOT_SUPPORTED_KEY,  
                                                             _MSG_TARGETHOSTFORMAT_NOT_SUPPORTED,  
                                                             _MSG_HOSTNAME,  
                                                             _MSG_IPV4,  
                                                             _MSG_TARGETHOSTFORMAT));  
   
             break;  
         }  
     }  
   
     global_ti.t_ipPort = htons((unsigned short)portNumber);  
   
     // Community Name, default is public  
     CString _community;  
     if (securityName.size() == 0)  
     {  
         String community;  
         community.assign("public");  
         _community = community.getCString();  
     }  
     else  
     {  
         _community = securityName.getCString();  
     }  
   
     OctetString* community_name = MakeOctetStringFromText(_community);  
   
     if (community_name == NULL)  
     {  
   
       // l10n  
   
       // throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED,  
       //   _MSG_INVALID_SECURITY_NAME);  
   
       throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,  
                                     MessageLoaderParms(_MSG_INVALID_SECURITY_NAME_KEY,  
                                                        _MSG_INVALID_SECURITY_NAME,  
                                                        _MSG_SECURITY_NAME));  
   
     }  
     // getting IP address of the host     // getting IP address of the host
  
     CString hostname = System::getHostName().getCString();     CString hostname = System::getHostName().getCString();


Legend:
Removed from v.1.11.12.3  
changed lines
  Added in v.1.14

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2