(file) Return to CIMClientRep.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Client

Diff for /pegasus/src/Pegasus/Client/CIMClientRep.cpp between version 1.56.2.1 and 1.57

version 1.56.2.1, 2006/07/27 23:11:50 version 1.57, 2006/07/27 08:37:24
Line 489 
Line 489 
     const CIMPropertyList& propertyList     const CIMPropertyList& propertyList
 ) )
 { {
     compareObjectPathtoCurrentConnection(instanceName);  
   
     AutoPtr<CIMRequestMessage> request(new CIMGetInstanceRequestMessage(     AutoPtr<CIMRequestMessage> request(new CIMGetInstanceRequestMessage(
         String::EMPTY,         String::EMPTY,
         nameSpace,         nameSpace,
Line 535 
Line 533 
     const CIMObjectPath& instanceName     const CIMObjectPath& instanceName
 ) )
 { {
     compareObjectPathtoCurrentConnection(instanceName);  
     AutoPtr<CIMRequestMessage> request(new CIMDeleteInstanceRequestMessage(     AutoPtr<CIMRequestMessage> request(new CIMDeleteInstanceRequestMessage(
         String::EMPTY,         String::EMPTY,
         nameSpace,         nameSpace,
Line 574 
Line 571 
     const CIMInstance& newInstance     const CIMInstance& newInstance
 ) )
 { {
     compareObjectPathtoCurrentConnection(newInstance.getPath());  
     AutoPtr<CIMRequestMessage> request(new CIMCreateInstanceRequestMessage(     AutoPtr<CIMRequestMessage> request(new CIMCreateInstanceRequestMessage(
         String::EMPTY,         String::EMPTY,
         nameSpace,         nameSpace,
Line 617 
Line 613 
     const CIMPropertyList& propertyList     const CIMPropertyList& propertyList
 ) )
 { {
     compareObjectPathtoCurrentConnection(modifiedInstance.getPath());  
     AutoPtr<CIMRequestMessage> request(new CIMModifyInstanceRequestMessage(     AutoPtr<CIMRequestMessage> request(new CIMModifyInstanceRequestMessage(
         String::EMPTY,         String::EMPTY,
         nameSpace,         nameSpace,
Line 780 
Line 775 
     const CIMPropertyList& propertyList     const CIMPropertyList& propertyList
 ) )
 { {
     compareObjectPathtoCurrentConnection(objectName);  
     AutoPtr<CIMRequestMessage> request(new CIMAssociatorsRequestMessage(     AutoPtr<CIMRequestMessage> request(new CIMAssociatorsRequestMessage(
         String::EMPTY,         String::EMPTY,
         nameSpace,         nameSpace,
Line 813 
Line 807 
     const String& resultRole     const String& resultRole
 ) )
 { {
     compareObjectPathtoCurrentConnection(objectName);  
     AutoPtr<CIMRequestMessage> request(new CIMAssociatorNamesRequestMessage(     AutoPtr<CIMRequestMessage> request(new CIMAssociatorNamesRequestMessage(
         String::EMPTY,         String::EMPTY,
         nameSpace,         nameSpace,
Line 844 
Line 837 
     const CIMPropertyList& propertyList     const CIMPropertyList& propertyList
 ) )
 { {
     compareObjectPathtoCurrentConnection(objectName);  
     AutoPtr<CIMRequestMessage> request(new CIMReferencesRequestMessage(     AutoPtr<CIMRequestMessage> request(new CIMReferencesRequestMessage(
         String::EMPTY,         String::EMPTY,
         nameSpace,         nameSpace,
Line 873 
Line 865 
     const String& role     const String& role
 ) )
 { {
     compareObjectPathtoCurrentConnection(objectName);  
     AutoPtr<CIMRequestMessage> request(new CIMReferenceNamesRequestMessage(     AutoPtr<CIMRequestMessage> request(new CIMReferenceNamesRequestMessage(
         String::EMPTY,         String::EMPTY,
         nameSpace,         nameSpace,
Line 898 
Line 889 
     const CIMName& propertyName     const CIMName& propertyName
 ) )
 { {
     compareObjectPathtoCurrentConnection(instanceName);  
     AutoPtr<CIMRequestMessage> request(new CIMGetPropertyRequestMessage(     AutoPtr<CIMRequestMessage> request(new CIMGetPropertyRequestMessage(
         String::EMPTY,         String::EMPTY,
         nameSpace,         nameSpace,
Line 923 
Line 913 
     const CIMValue& newValue     const CIMValue& newValue
 ) )
 { {
     compareObjectPathtoCurrentConnection(instanceName);  
     AutoPtr<CIMRequestMessage> request(new CIMSetPropertyRequestMessage(     AutoPtr<CIMRequestMessage> request(new CIMSetPropertyRequestMessage(
         String::EMPTY,         String::EMPTY,
         nameSpace,         nameSpace,
Line 1034 
Line 1023 
     // solved with PEP#139 Stage1 as other CIMOMs contained in the object path     // solved with PEP#139 Stage1 as other CIMOMs contained in the object path
     // will cause a TypeMisMatchException     // will cause a TypeMisMatchException
  
     compareObjectPathtoCurrentConnection(instanceName);  
     AutoPtr<CIMRequestMessage> request(new CIMInvokeMethodRequestMessage(     AutoPtr<CIMRequestMessage> request(new CIMInvokeMethodRequestMessage(
         String::EMPTY,         String::EMPTY,
         nameSpace,         nameSpace,
Line 1280 
Line 1268 
         }         }
  
         nowMilliseconds = TimeValue::getCurrentTime().toMilliseconds();         nowMilliseconds = TimeValue::getCurrentTime().toMilliseconds();
         Threads::yield();          pegasus_yield();
     }     }
  
     //     //
Line 1312 
Line 1300 
     return hostname;     return hostname;
 } }
  
 void CIMClientRep::compareObjectPathtoCurrentConnection(const CIMObjectPath& obj)  
 {  
   
     String ObjHost = obj.getHost();  
     // test if a host is given at all, if not everything is fine and we leave it at that  
     if (ObjHost==String::EMPTY)  
     {  
         return;  
     }  
   
     MessageLoaderParms typeMismatchMessage;  
     // splitting the port from hostname as we have to compare both separate  
         int i = ObjHost.find(":");  
         String ObjPort = String::EMPTY;  
         // only if there is a ":" we should split a port address from hostname string  
         if (i > 0)  
         {  
             ObjPort = ObjHost.subString(i+1);  
             ObjHost.remove(i);  
   
             // lets see who we are really connected to  
             // should stand in UInt32 _connectPortNumber and String _connectHost;  
   
             // comparing the stuff  
             // first the easy part, comparing the ports  
             Uint32 objectport = strtoul((const char*) ObjPort.getCString(), NULL, 0);  
   
         // if port in object path does not equal port of connection throw a TypeMismatch Exception  
         if (objectport != _connectPortNumber)  
         {  
             typeMismatchMessage = MessageLoaderParms("Client.CIMClientRep.TYPEMISMATCH_PORTMISMATCH",  
                                                      "Failed validation of CIM object path: port of CIMClient connection($0) and port of object path($1) not equal",  
                                                      _connectPortNumber, objectport);  
             throw TypeMismatchException(typeMismatchMessage);  
         }  
     }  
 }  
   
  
 void CIMClientRep::registerClientOpPerformanceDataHandler(ClientOpPerformanceDataHandler & handler) void CIMClientRep::registerClientOpPerformanceDataHandler(ClientOpPerformanceDataHandler & handler)
 { {


Legend:
Removed from v.1.56.2.1  
changed lines
  Added in v.1.57

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2