(file) Return to CMPIProviderManager.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / ProviderManager2 / CMPI

Diff for /pegasus/src/Pegasus/ProviderManager2/CMPI/CMPIProviderManager.cpp between version 1.157 and 1.157.2.7

version 1.157, 2009/06/30 10:40:14 version 1.157.2.7, 2009/10/24 23:34:48
Line 38 
Line 38 
 #include "CMPI_ObjectPath.h" #include "CMPI_ObjectPath.h"
 #include "CMPI_Result.h" #include "CMPI_Result.h"
 #include "CMPI_SelectExp.h" #include "CMPI_SelectExp.h"
   #include "CMPISCMOUtilities.h"
   #include "CMPI_Value.h"
   
  
 #include <Pegasus/Common/CIMMessage.h> #include <Pegasus/Common/CIMMessage.h>
 #include <Pegasus/Common/OperationContext.h> #include <Pegasus/Common/OperationContext.h>
Line 159 
Line 162 
             selxTab.lookup(i.key(), selx);             selxTab.lookup(i.key(), selx);
             if (selx->eSelx)             if (selx->eSelx)
                 delete selx->eSelx;                 delete selx->eSelx;
             if (selx->qContext)  
                 delete selx->qContext;  
             delete selx;             delete selx;
             //Same as above!             //Same as above!
             //selxTab.remove(i.key());             //selxTab.remove(i.key());
Line 459 
Line 460 
             (const char*)             (const char*)
                 request->instanceName.getClassName().getString().getCString()));                 request->instanceName.getClassName().getString().getCString()));
  
         // make target object path  
         CIMObjectPath objectPath(  
             System::getHostName(),  
             request->nameSpace,  
             request->instanceName.getClassName(),  
             request->instanceName.getKeyBindings());  
   
         Boolean remote=false;         Boolean remote=false;
         OpProviderHolder ph;         OpProviderHolder ph;
         CString remoteInfo;         CString remoteInfo;
Line 478 
Line 472 
  
         CMPIStatus rc={CMPI_RC_OK,NULL};         CMPIStatus rc={CMPI_RC_OK,NULL};
         CMPI_ContextOnStack eCtx(request->operationContext);         CMPI_ContextOnStack eCtx(request->operationContext);
         CMPI_ObjectPathOnStack eRef(objectPath);  
         CMPI_ResultOnStack eRes(handler,pr.getBroker());         CMPI_ResultOnStack eRes(handler,pr.getBroker());
         CMPI_ThreadContext thr(pr.getBroker(),&eCtx);         CMPI_ThreadContext thr(pr.getBroker(),&eCtx);
  
         CMPIPropertyList props(request->propertyList);         CMPIPropertyList props(request->propertyList);
         CString nameSpace = request->nameSpace.getString().getCString();         CString nameSpace = request->nameSpace.getString().getCString();
           CString className = request->className.getString().getCString();
  
         _setupCMPIContexts(         _setupCMPIContexts(
             &eCtx,             &eCtx,
Line 495 
Line 489 
             request->includeClassOrigin,             request->includeClassOrigin,
             true);             true);
  
           // make target object path
           SCMOClass* scmoClass =
               mbGetSCMOClass(
                   pr.getBroker(),
                   (const char*)nameSpace,
                   (const char*)className);
           if (0 == scmoClass)
           {
               // This indicates a severe error, since we should't have come
               // here at all, if the class is invalid
               PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL1,
                   "CMPIProviderManager::handleGetInstanceRequest - "
                   "Failed to obtain CIMClass for Namespace: %s  Classname: %s",
                   (const char*) nameSpace,
                   (const char*) className));
   
               CIMException cimException(CIM_ERR_NOT_FOUND);
               throw cimException;
           }
   
           SCMOInstance objectPath(*scmoClass,request->instanceName);
           objectPath.setHostName((const char*)System::getHostName().getCString());
           CMPI_ObjectPathOnStack eRef(objectPath);
   
         CMPIProvider::pm_service_op_lock op_lock(&pr);         CMPIProvider::pm_service_op_lock op_lock(&pr);
  
         PEG_TRACE((         PEG_TRACE((
Line 538 
Line 556 
             handler.setContext(response->operationContext);             handler.setContext(response->operationContext);
         }         }
  
         if (rc.rc!=CMPI_RC_OK)          _throwCIMException(rc, eRes.resError);
         {  
             CIMException cimException(  
                 (CIMStatusCode)rc.rc,  
                 rc.msg ? CMGetCharsPtr(rc.msg, NULL) : String::EMPTY);  
   
             if (eRes.resError)  
             {  
                 for (CMPI_Error* currErr=eRes.resError;  
                     currErr!=NULL;  
                     currErr=currErr->nextError)  
                 {  
                     cimException.addError(  
                         ((CIMError*)currErr->hdl)->getInstance());  
                 }  
             }  
             throw cimException;  
         }  
     }     }
     HandlerCatch(handler);     HandlerCatch(handler);
  
Line 581 
Line 582 
             (const char*) request->nameSpace.getString().getCString(),             (const char*) request->nameSpace.getString().getCString(),
             (const char*) request->className.getString().getCString()));             (const char*) request->className.getString().getCString()));
  
         // make target object path  
         CIMObjectPath objectPath(  
             System::getHostName(),  
             request->nameSpace,  
             request->className);  
  
         Boolean remote=false;         Boolean remote=false;
         OpProviderHolder ph;         OpProviderHolder ph;
Line 601 
Line 597 
  
         CMPIStatus rc={CMPI_RC_OK,NULL};         CMPIStatus rc={CMPI_RC_OK,NULL};
         CMPI_ContextOnStack eCtx(request->operationContext);         CMPI_ContextOnStack eCtx(request->operationContext);
         CMPI_ObjectPathOnStack eRef(objectPath);  
         CMPI_ResultOnStack eRes(handler,pr.getBroker());         CMPI_ResultOnStack eRes(handler,pr.getBroker());
         CMPI_ThreadContext thr(pr.getBroker(),&eCtx);         CMPI_ThreadContext thr(pr.getBroker(),&eCtx);
         CMPIPropertyList props(propertyList);         CMPIPropertyList props(propertyList);
         CString nameSpace = request->nameSpace.getString().getCString();         CString nameSpace = request->nameSpace.getString().getCString();
           CString className = request->className.getString().getCString();
  
         _setupCMPIContexts(         _setupCMPIContexts(
             &eCtx,             &eCtx,
Line 617 
Line 613 
             request->includeClassOrigin,             request->includeClassOrigin,
             true);             true);
  
           // make target object path
           SCMOClass* scmoClass =
               mbGetSCMOClass(
                   pr.getBroker(),
                   (const char*)nameSpace,
                   (const char*)className);
           if (0 == scmoClass)
           {
               // This indicates a severe error, since we should't have come
               // here at all, if the class is invalid
               PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL1,
                   "CMPIProviderManager::handleEnumerateInstancesRequest - "
                   "Failed to obtain CIMClass for Namespace: %s  Classname: %s",
                   (const char*) nameSpace,
                   (const char*) className));
   
               CIMException cimException(CIM_ERR_NOT_FOUND);
               throw cimException;
           }
   
           SCMOInstance objectPath(*scmoClass);
           CMPI_ObjectPathOnStack eRef(objectPath);
   
         CMPIProvider::pm_service_op_lock op_lock(&pr);         CMPIProvider::pm_service_op_lock op_lock(&pr);
  
         PEG_TRACE((         PEG_TRACE((
Line 660 
Line 679 
             handler.setContext(response->operationContext);             handler.setContext(response->operationContext);
         }         }
  
         if (rc.rc!=CMPI_RC_OK)          _throwCIMException(rc, eRes.resError);
         {  
             CIMException cimException(  
                 (CIMStatusCode)rc.rc,  
                 rc.msg ? CMGetCharsPtr(rc.msg, NULL) : String::EMPTY);  
   
             if (eRes.resError)  
             {  
                 for (CMPI_Error* currErr=eRes.resError;  
                     currErr!=NULL;  
                     currErr=currErr->nextError)  
                 {  
                     cimException.addError(  
                         ((CIMError*)currErr->hdl)->getInstance());  
                 }  
             }  
             throw cimException;  
         }  
   
     }     }
     HandlerCatch(handler);     HandlerCatch(handler);
  
Line 704 
Line 705 
             (const char*) request->nameSpace.getString().getCString(),             (const char*) request->nameSpace.getString().getCString(),
             (const char*) request->className.getString().getCString()));             (const char*) request->className.getString().getCString()));
  
         // make target object path  
         CIMObjectPath objectPath(  
             System::getHostName(),  
             request->nameSpace,  
             request->className);  
   
         Boolean remote=false;         Boolean remote=false;
         OpProviderHolder ph;         OpProviderHolder ph;
         CString remoteInfo;         CString remoteInfo;
Line 722 
Line 717 
  
         CMPIStatus rc={CMPI_RC_OK,NULL};         CMPIStatus rc={CMPI_RC_OK,NULL};
         CMPI_ContextOnStack eCtx(request->operationContext);         CMPI_ContextOnStack eCtx(request->operationContext);
         CMPI_ObjectPathOnStack eRef(objectPath);  
         CMPI_ResultOnStack eRes(handler,pr.getBroker());         CMPI_ResultOnStack eRes(handler,pr.getBroker());
         CMPI_ThreadContext thr(pr.getBroker(),&eCtx);         CMPI_ThreadContext thr(pr.getBroker(),&eCtx);
  
         CString nameSpace = request->nameSpace.getString().getCString();         CString nameSpace = request->nameSpace.getString().getCString();
           CString className = request->className.getString().getCString();
  
         _setupCMPIContexts(         _setupCMPIContexts(
             &eCtx,             &eCtx,
Line 738 
Line 733 
             false,             false,
             true);             true);
  
           // make target object path
           SCMOClass* scmoClass =
               mbGetSCMOClass(
                   pr.getBroker(),
                   (const char*)nameSpace,
                   (const char*)className);
           if (0 == scmoClass)
           {
               // This indicates a severe error, since we should't have come
               // here at all, if the class is invalid
               PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL1,
                   "CMPIProviderManager::handleEnumerateInstanceNamesRequest - "
                   "Failed to obtain CIMClass for Namespace: %s  Classname: %s",
                   (const char*) nameSpace,
                   (const char*) className));
   
               CIMException cimException(CIM_ERR_NOT_FOUND);
               throw cimException;
           }
   
           SCMOInstance objectPath(*scmoClass);
           CMPI_ObjectPathOnStack eRef(objectPath);
   
         CMPIProvider::pm_service_op_lock op_lock(&pr);         CMPIProvider::pm_service_op_lock op_lock(&pr);
  
         PEG_TRACE((         PEG_TRACE((
Line 779 
Line 797 
                 CMGetCharsPtr(cldata.value.string, NULL)))));                 CMGetCharsPtr(cldata.value.string, NULL)))));
             handler.setContext(response->operationContext);             handler.setContext(response->operationContext);
         }         }
           _throwCIMException(rc, eRes.resError);
         if (rc.rc!=CMPI_RC_OK)  
         {  
             CIMException cimException(  
                 (CIMStatusCode)rc.rc,  
                 rc.msg ? CMGetCharsPtr(rc.msg, NULL) : String::EMPTY);  
   
             if (eRes.resError)  
             {  
                 for (CMPI_Error* currErr=eRes.resError;  
                     currErr!=NULL;  
                     currErr=currErr->nextError)  
                 {  
                     cimException.addError(  
                         ((CIMError*)currErr->hdl)->getInstance());  
                 }  
             }  
             throw cimException;  
         }  
     }     }
     HandlerCatch(handler);     HandlerCatch(handler);
  
Line 825 
Line 825 
           request->newInstance.getPath().getClassName().getString().getCString()           request->newInstance.getPath().getClassName().getString().getCString()
         ));         ));
  
         // make target object path  
         CIMObjectPath objectPath(  
             System::getHostName(),  
             request->nameSpace,  
             request->newInstance.getPath().getClassName(),  
             request->newInstance.getPath().getKeyBindings());  
         request->newInstance.setPath(objectPath);  
   
         Boolean remote=false;         Boolean remote=false;
         OpProviderHolder ph;         OpProviderHolder ph;
         CString remoteInfo;         CString remoteInfo;
Line 845 
Line 837 
  
         CMPIStatus rc={CMPI_RC_OK,NULL};         CMPIStatus rc={CMPI_RC_OK,NULL};
         CMPI_ContextOnStack eCtx(request->operationContext);         CMPI_ContextOnStack eCtx(request->operationContext);
         CMPI_ObjectPathOnStack eRef(objectPath);  
         CMPI_ResultOnStack eRes(handler,pr.getBroker());         CMPI_ResultOnStack eRes(handler,pr.getBroker());
         CMPI_InstanceOnStack eInst(request->newInstance);  
         CMPI_ThreadContext thr(pr.getBroker(),&eCtx);         CMPI_ThreadContext thr(pr.getBroker(),&eCtx);
  
         CString nameSpace = request->nameSpace.getString().getCString();         CString nameSpace = request->nameSpace.getString().getCString();
           CString className = request->newInstance.getPath().getClassName().
               getString().getCString();
  
         _setupCMPIContexts(         _setupCMPIContexts(
             &eCtx,             &eCtx,
Line 862 
Line 854 
             false,             false,
             true);             true);
  
           // make target object path and new instance
           SCMOClass* scmoClass =
               mbGetSCMOClass(
                   pr.getBroker(),
                   (const char*)nameSpace,
                   (const char*)className);
           if (0 == scmoClass)
           {
               // This indicates a severe error, since we should't have come
               // here at all, if the class is invalid
               PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL1,
                   "CMPIProviderManager::handleGetInstanceRequest - "
                   "Failed to obtain CIMClass for Namespace: %s  Classname: %s",
                   (const char*) nameSpace,
                   (const char*) className));
   
               CIMException cimException(CIM_ERR_NOT_FOUND);
               throw cimException;
           }
   
           SCMOInstance newInstance(*scmoClass,request->newInstance);
           newInstance.setHostName(
               (const char*)System::getHostName().getCString());
           CMPI_ObjectPathOnStack eRef(newInstance);
           CMPI_InstanceOnStack eInst(newInstance);
   
         CMPIProvider::pm_service_op_lock op_lock(&pr);         CMPIProvider::pm_service_op_lock op_lock(&pr);
  
         PEG_TRACE((         PEG_TRACE((
Line 904 
Line 922 
                 CMGetCharsPtr(cldata.value.string, NULL)))));                 CMGetCharsPtr(cldata.value.string, NULL)))));
             handler.setContext(response->operationContext);             handler.setContext(response->operationContext);
         }         }
           _throwCIMException(rc, eRes.resError);
         if (rc.rc!=CMPI_RC_OK)  
         {  
             CIMException cimException(  
                 (CIMStatusCode)rc.rc,  
                 rc.msg ? CMGetCharsPtr(rc.msg, NULL) : String::EMPTY);  
   
             if (eRes.resError)  
             {  
                 for (CMPI_Error* currErr=eRes.resError;  
                     currErr!=NULL;  
                     currErr=currErr->nextError)  
                 {  
                     cimException.addError(  
                         ((CIMError*)currErr->hdl)->getInstance());  
                 }  
             }  
             throw cimException;  
         }  
     }     }
     HandlerCatch(handler);     HandlerCatch(handler);
  
Line 949 
Line 949 
             (const char*) request->modifiedInstance.\             (const char*) request->modifiedInstance.\
                 getPath().getClassName().getString().getCString()));                 getPath().getClassName().getString().getCString()));
  
         // make target object path  
         CIMObjectPath objectPath(  
             System::getHostName(),  
             request->nameSpace,  
             request->modifiedInstance.getPath ().getClassName(),  
             request->modifiedInstance.getPath ().getKeyBindings());  
   
         Boolean remote=false;         Boolean remote=false;
         OpProviderHolder ph;         OpProviderHolder ph;
         CString remoteInfo;         CString remoteInfo;
Line 968 
Line 961 
  
         CMPIStatus rc={CMPI_RC_OK,NULL};         CMPIStatus rc={CMPI_RC_OK,NULL};
         CMPI_ContextOnStack eCtx(request->operationContext);         CMPI_ContextOnStack eCtx(request->operationContext);
         CMPI_ObjectPathOnStack eRef(objectPath);  
         CMPI_ResultOnStack eRes(handler,pr.getBroker());         CMPI_ResultOnStack eRes(handler,pr.getBroker());
         CMPI_InstanceOnStack eInst(request->modifiedInstance);  
         CMPI_ThreadContext thr(pr.getBroker(),&eCtx);         CMPI_ThreadContext thr(pr.getBroker(),&eCtx);
  
         CMPIPropertyList props(request->propertyList);         CMPIPropertyList props(request->propertyList);
  
         CString nameSpace = request->nameSpace.getString().getCString();         CString nameSpace = request->nameSpace.getString().getCString();
           CString className = request->modifiedInstance.getPath().getClassName().
               getString().getCString();
  
         _setupCMPIContexts(         _setupCMPIContexts(
             &eCtx,             &eCtx,
Line 987 
Line 980 
             false,             false,
             true);             true);
  
           // make target object path and modified instance
           SCMOClass* scmoClass =
               mbGetSCMOClass(
                   pr.getBroker(),
                   (const char*)nameSpace,
                   (const char*)className);
           if (0 == scmoClass)
           {
               // This indicates a severe error, since we should't have come
               // here at all, if the class is invalid
               PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL1,
                   "CMPIProviderManager::handleGetInstanceRequest - "
                   "Failed to obtain CIMClass for Namespace: %s  Classname: %s",
                   (const char*) nameSpace,
                   (const char*) className));
   
               CIMException cimException(CIM_ERR_NOT_FOUND);
               throw cimException;
           }
   
           SCMOInstance modInstance(*scmoClass,request->modifiedInstance);
           modInstance.setHostName(
               (const char*)System::getHostName().getCString());
           CMPI_ObjectPathOnStack eRef(modInstance);
           CMPI_InstanceOnStack eInst(modInstance);
   
         CMPIProvider::pm_service_op_lock op_lock(&pr);         CMPIProvider::pm_service_op_lock op_lock(&pr);
  
         PEG_TRACE((         PEG_TRACE((
Line 1030 
Line 1049 
                 CMGetCharsPtr(cldata.value.string, NULL)))));                 CMGetCharsPtr(cldata.value.string, NULL)))));
             handler.setContext(response->operationContext);             handler.setContext(response->operationContext);
         }         }
           _throwCIMException(rc, eRes.resError);
         if (rc.rc!=CMPI_RC_OK)  
         {  
             CIMException cimException(  
                 (CIMStatusCode)rc.rc,  
                 rc.msg ? CMGetCharsPtr(rc.msg, NULL) : String::EMPTY);  
   
             if (eRes.resError)  
             {  
                 for (CMPI_Error* currErr=eRes.resError;  
                     currErr!=NULL;  
                     currErr=currErr->nextError)  
                 {  
                     cimException.addError(  
                         ((CIMError*)currErr->hdl)->getInstance());  
                 }  
             }  
             throw cimException;  
         }  
     }     }
     HandlerCatch(handler);     HandlerCatch(handler);
  
Line 1075 
Line 1076 
             (const char*)             (const char*)
                 request->instanceName.getClassName().getString().getCString()));                 request->instanceName.getClassName().getString().getCString()));
  
         // make target object path  
         CIMObjectPath objectPath(  
             System::getHostName(),  
             request->nameSpace,  
             request->instanceName.getClassName(),  
             request->instanceName.getKeyBindings());  
   
         Boolean remote=false;         Boolean remote=false;
         OpProviderHolder ph;         OpProviderHolder ph;
         CString remoteInfo;         CString remoteInfo;
Line 1094 
Line 1088 
  
         CMPIStatus rc={CMPI_RC_OK,NULL};         CMPIStatus rc={CMPI_RC_OK,NULL};
         CMPI_ContextOnStack eCtx(request->operationContext);         CMPI_ContextOnStack eCtx(request->operationContext);
         CMPI_ObjectPathOnStack eRef(objectPath);  
         CMPI_ResultOnStack eRes(handler,pr.getBroker());         CMPI_ResultOnStack eRes(handler,pr.getBroker());
         CMPI_ThreadContext thr(pr.getBroker(),&eCtx);         CMPI_ThreadContext thr(pr.getBroker(),&eCtx);
  
         CString nameSpace = request->nameSpace.getString().getCString();         CString nameSpace = request->nameSpace.getString().getCString();
           CString className = request->instanceName.getClassName().
               getString().getCString();
  
         _setupCMPIContexts(         _setupCMPIContexts(
             &eCtx,             &eCtx,
Line 1110 
Line 1105 
             false,             false,
             true);             true);
  
           // make target object path
           SCMOClass* scmoClass =
               mbGetSCMOClass(
                   pr.getBroker(),
                   (const char*)nameSpace,
                   (const char*)className);
           if (0 == scmoClass)
           {
               // This indicates a severe error, since we should't have come
               // here at all, if the class is invalid
               PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL1,
                   "CMPIProviderManager::handleGetInstanceRequest - "
                   "Failed to obtain CIMClass for Namespace: %s  Classname: %s",
                   (const char*) nameSpace,
                   (const char*) className));
   
               CIMException cimException(CIM_ERR_NOT_FOUND);
               throw cimException;
           }
   
           SCMOInstance objectPath(*scmoClass, request->instanceName);
           objectPath.setHostName((const char*)System::getHostName().getCString());
           CMPI_ObjectPathOnStack eRef(objectPath);
   
         CMPIProvider::pm_service_op_lock op_lock(&pr);         CMPIProvider::pm_service_op_lock op_lock(&pr);
  
         PEG_TRACE((         PEG_TRACE((
Line 1151 
Line 1170 
                 CMGetCharsPtr(cldata.value.string, NULL)))));                 CMGetCharsPtr(cldata.value.string, NULL)))));
             handler.setContext(response->operationContext);             handler.setContext(response->operationContext);
         }         }
           _throwCIMException(rc, eRes.resError);
         if (rc.rc!=CMPI_RC_OK)  
         {  
             CIMException cimException(  
                 (CIMStatusCode)rc.rc,  
                 rc.msg ? CMGetCharsPtr(rc.msg, NULL) : String::EMPTY);  
   
             if (eRes.resError)  
             {  
                 for (CMPI_Error* currErr=eRes.resError;  
                     currErr!=NULL;  
                     currErr=currErr->nextError)  
                 {  
                     cimException.addError(  
                         ((CIMError*)currErr->hdl)->getInstance());  
                 }  
             }  
             throw cimException;  
         }  
     }     }
     HandlerCatch(handler);     HandlerCatch(handler);
  
Line 1195 
Line 1196 
             (const char*) request->nameSpace.getString().getCString(),             (const char*) request->nameSpace.getString().getCString(),
             (const char*) request->className.getString().getCString()));             (const char*) request->className.getString().getCString()));
  
         // make target object path  
         CIMObjectPath objectPath(  
             System::getHostName(),  
             request->nameSpace,  
             request->className);  
   
         Boolean remote=false;         Boolean remote=false;
         OpProviderHolder ph;         OpProviderHolder ph;
         CString remoteInfo;         CString remoteInfo;
Line 1215 
Line 1210 
  
         CMPIStatus rc={CMPI_RC_OK,NULL};         CMPIStatus rc={CMPI_RC_OK,NULL};
         CMPI_ContextOnStack eCtx(request->operationContext);         CMPI_ContextOnStack eCtx(request->operationContext);
         CMPI_ObjectPathOnStack eRef(objectPath);  
         CMPI_ResultOnStack eRes(handler,pr.getBroker());         CMPI_ResultOnStack eRes(handler,pr.getBroker());
         CMPI_ThreadContext thr(pr.getBroker(),&eCtx);         CMPI_ThreadContext thr(pr.getBroker(),&eCtx);
  
         const CString queryLan=request->queryLanguage.getCString();         const CString queryLan=request->queryLanguage.getCString();
         const CString query=request->query.getCString();         const CString query=request->query.getCString();
         CString nameSpace = request->nameSpace.getString().getCString();         CString nameSpace = request->nameSpace.getString().getCString();
           CString className = request->className.getString().getCString();
  
         _setupCMPIContexts(         _setupCMPIContexts(
             &eCtx,             &eCtx,
Line 1233 
Line 1228 
             false,             false,
             true);             true);
  
           // make target object path
           SCMOClass* scmoClass =
               mbGetSCMOClass(
                   pr.getBroker(),
                   (const char*)nameSpace,
                   (const char*)className);
           if (0 == scmoClass)
           {
               // This indicates a severe error, since we should't have come
               // here at all, if the class is invalid
               PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL1,
                   "CMPIProviderManager::handleGetInstanceRequest - "
                   "Failed to obtain CIMClass for Namespace: %s  Classname: %s",
                   (const char*) nameSpace,
                   (const char*) className));
   
               CIMException cimException(CIM_ERR_NOT_FOUND);
               throw cimException;
           }
   
           SCMOInstance objectPath(*scmoClass);
           objectPath.setHostName((const char*)System::getHostName().getCString());
           CMPI_ObjectPathOnStack eRef(objectPath);
   
         CMPIProvider::pm_service_op_lock op_lock(&pr);         CMPIProvider::pm_service_op_lock op_lock(&pr);
  
         PEG_TRACE((         PEG_TRACE((
Line 1276 
Line 1295 
                 CMGetCharsPtr(cldata.value.string, NULL)))));                 CMGetCharsPtr(cldata.value.string, NULL)))));
             handler.setContext(response->operationContext);             handler.setContext(response->operationContext);
         }         }
           _throwCIMException(rc, eRes.resError);
         if (rc.rc!=CMPI_RC_OK)  
         {  
             CIMException cimException(  
                 (CIMStatusCode)rc.rc,  
                 rc.msg ? CMGetCharsPtr(rc.msg, NULL) : String::EMPTY);  
   
             if (eRes.resError)  
             {  
                 for (CMPI_Error* currErr=eRes.resError;  
                     currErr!=NULL;  
                     currErr=currErr->nextError)  
                 {  
                     cimException.addError(  
                         ((CIMError*)currErr->hdl)->getInstance());  
                 }  
             }  
             throw cimException;  
         }  
  
     }     }
     HandlerCatch(handler);     HandlerCatch(handler);
Line 1321 
Line 1322 
             (const char*)             (const char*)
                 request->objectName.getClassName().getString().getCString()));                 request->objectName.getClassName().getString().getCString()));
  
         // make target object path  
         CIMObjectPath objectPath(  
             System::getHostName(),  
             request->nameSpace,  
             request->objectName.getClassName());  
   
         objectPath.setKeyBindings(request->objectName.getKeyBindings());  
   
         CIMObjectPath assocPath(  
             System::getHostName(),  
             request->nameSpace,  
             request->assocClass.getString());  
   
         Boolean remote=false;         Boolean remote=false;
         OpProviderHolder ph;         OpProviderHolder ph;
         CString remoteInfo;         CString remoteInfo;
Line 1351 
Line 1339 
  
         CMPIStatus rc={CMPI_RC_OK,NULL};         CMPIStatus rc={CMPI_RC_OK,NULL};
         CMPI_ContextOnStack eCtx(request->operationContext);         CMPI_ContextOnStack eCtx(request->operationContext);
         CMPI_ObjectPathOnStack eRef(objectPath);  
         CMPI_ResultOnStack eRes(handler,pr.getBroker());         CMPI_ResultOnStack eRes(handler,pr.getBroker());
         CMPI_ThreadContext thr(pr.getBroker(),&eCtx);         CMPI_ThreadContext thr(pr.getBroker(),&eCtx);
         const CString aClass=request->assocClass.getString().getCString();         const CString aClass=request->assocClass.getString().getCString();
Line 1359 
Line 1346 
         const CString rRole=request->role.getCString();         const CString rRole=request->role.getCString();
         const CString resRole=request->resultRole.getCString();         const CString resRole=request->resultRole.getCString();
         CString nameSpace = request->nameSpace.getString().getCString();         CString nameSpace = request->nameSpace.getString().getCString();
           CString className =
               request->objectName.getClassName().getString().getCString();
  
         CMPIPropertyList props(request->propertyList);         CMPIPropertyList props(request->propertyList);
  
Line 1372 
Line 1361 
             request->includeClassOrigin,             request->includeClassOrigin,
             true);             true);
  
           // make target object path
           SCMOClass* scmoClass =
               mbGetSCMOClass(
                   pr.getBroker(),
                   (const char*)nameSpace,
                   (const char*)className);
           if (0 == scmoClass)
           {
               // This indicates a severe error, since we should't have come
               // here at all, if the class is invalid
               PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL1,
                   "CMPIProviderManager::handleAssociatorsRequest - "
                   "Failed to obtain CIMClass for Namespace: %s  Classname: %s",
                   (const char*) nameSpace,
                   (const char*) className));
   
               CIMException cimException(CIM_ERR_NOT_FOUND);
               throw cimException;
           }
   
           SCMOInstance objectPath(*scmoClass,request->objectName);
           objectPath.setHostName((const char*)System::getHostName().getCString());
           CMPI_ObjectPathOnStack eRef(objectPath);
   
         CMPIProvider::pm_service_op_lock op_lock(&pr);         CMPIProvider::pm_service_op_lock op_lock(&pr);
  
         PEG_TRACE((         PEG_TRACE((
Line 1418 
Line 1431 
                 ContentLanguageList(                 ContentLanguageList(
                 LanguageParser::parseContentLanguageHeader(                 LanguageParser::parseContentLanguageHeader(
                 CMGetCharsPtr(cldata.value.string, NULL)))));                 CMGetCharsPtr(cldata.value.string, NULL)))));
             handler.setContext(response->operationContext);              handler.setContext(response->operationContext);
         }  
   
         if (rc.rc!=CMPI_RC_OK)  
         {  
             CIMException cimException(  
                 (CIMStatusCode)rc.rc,  
                 rc.msg ? CMGetCharsPtr(rc.msg, NULL) : String::EMPTY);  
   
             if (eRes.resError)  
             {  
                 for (CMPI_Error* currErr=eRes.resError;  
                     currErr!=NULL;  
                     currErr=currErr->nextError)  
                 {  
                     cimException.addError(  
                         ((CIMError*)currErr->hdl)->getInstance());  
                 }  
             }  
             throw cimException;  
         }         }
           _throwCIMException(rc, eRes.resError);
     }     }
     HandlerCatch(handler);     HandlerCatch(handler);
  
Line 1465 
Line 1460 
             (const char*)             (const char*)
                 request->objectName.getClassName().getString().getCString()));                 request->objectName.getClassName().getString().getCString()));
  
         // make target object path  
         CIMObjectPath objectPath(  
             System::getHostName(),  
             request->nameSpace,  
             request->objectName.getClassName());  
   
         objectPath.setKeyBindings(request->objectName.getKeyBindings());  
   
         CIMObjectPath assocPath(  
             System::getHostName(),  
             request->nameSpace,  
             request->assocClass.getString());  
   
         Boolean remote=false;         Boolean remote=false;
         OpProviderHolder ph;         OpProviderHolder ph;
         CString remoteInfo;         CString remoteInfo;
Line 1495 
Line 1477 
  
         CMPIStatus rc={CMPI_RC_OK,NULL};         CMPIStatus rc={CMPI_RC_OK,NULL};
         CMPI_ContextOnStack eCtx(request->operationContext);         CMPI_ContextOnStack eCtx(request->operationContext);
         CMPI_ObjectPathOnStack eRef(objectPath);  
         CMPI_ResultOnStack eRes(handler,pr.getBroker());         CMPI_ResultOnStack eRes(handler,pr.getBroker());
         CMPI_ThreadContext thr(pr.getBroker(),&eCtx);         CMPI_ThreadContext thr(pr.getBroker(),&eCtx);
         const CString aClass=request->assocClass.getString().getCString();         const CString aClass=request->assocClass.getString().getCString();
Line 1503 
Line 1484 
         const CString rRole=request->role.getCString();         const CString rRole=request->role.getCString();
         const CString resRole=request->resultRole.getCString();         const CString resRole=request->resultRole.getCString();
         CString nameSpace = request->nameSpace.getString().getCString();         CString nameSpace = request->nameSpace.getString().getCString();
           CString className =
               request->objectName.getClassName().getString().getCString();
  
         _setupCMPIContexts(         _setupCMPIContexts(
             &eCtx,             &eCtx,
Line 1514 
Line 1497 
             false,             false,
             true);             true);
  
           // make target object path
           SCMOClass* scmoClass =
               mbGetSCMOClass(
                   pr.getBroker(),
                   (const char*)nameSpace,
                   (const char*)className);
           if (0 == scmoClass)
           {
               // This indicates a severe error, since we should't have come
               // here at all, if the class is invalid
               PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL1,
                   "CMPIProviderManager::handleAssociatorNamesRequest - "
                   "Failed to obtain CIMClass for Namespace: %s  Classname: %s",
                   (const char*) nameSpace,
                   (const char*) className));
   
               CIMException cimException(CIM_ERR_NOT_FOUND);
               throw cimException;
           }
   
           SCMOInstance objectPath(*scmoClass,request->objectName);
           objectPath.setHostName((const char*)System::getHostName().getCString());
           CMPI_ObjectPathOnStack eRef(objectPath);
   
         CMPIProvider::pm_service_op_lock op_lock(&pr);         CMPIProvider::pm_service_op_lock op_lock(&pr);
  
         PEG_TRACE((         PEG_TRACE((
Line 1559 
Line 1566 
                 CMGetCharsPtr(cldata.value.string, NULL)))));                 CMGetCharsPtr(cldata.value.string, NULL)))));
             handler.setContext(response->operationContext);             handler.setContext(response->operationContext);
         }         }
           _throwCIMException(rc, eRes.resError);
         if (rc.rc!=CMPI_RC_OK)  
         {  
             CIMException cimException(  
                 (CIMStatusCode)rc.rc,  
                 rc.msg ? CMGetCharsPtr(rc.msg, NULL) : String::EMPTY);  
   
             if (eRes.resError)  
             {  
                 for (CMPI_Error* currErr=eRes.resError;  
                     currErr!=NULL;  
                     currErr=currErr->nextError)  
                 {  
                     cimException.addError(  
                         ((CIMError*)currErr->hdl)->getInstance());  
                 }  
             }  
             throw cimException;  
         }  
     }     }
     HandlerCatch(handler);     HandlerCatch(handler);
  
Line 1603 
Line 1592 
             (const char*)             (const char*)
                 request->objectName.getClassName().getString().getCString()));                 request->objectName.getClassName().getString().getCString()));
  
         // make target object path  
         CIMObjectPath objectPath(  
             System::getHostName(),  
             request->nameSpace,  
             request->objectName.getClassName());  
   
         objectPath.setKeyBindings(request->objectName.getKeyBindings());  
   
         CIMObjectPath resultPath(  
             System::getHostName(),  
             request->nameSpace,  
             request->resultClass.getString());  
   
         Boolean remote=false;         Boolean remote=false;
         OpProviderHolder ph;         OpProviderHolder ph;
         CString remoteInfo;         CString remoteInfo;
Line 1633 
Line 1609 
  
         CMPIStatus rc={CMPI_RC_OK,NULL};         CMPIStatus rc={CMPI_RC_OK,NULL};
         CMPI_ContextOnStack eCtx(request->operationContext);         CMPI_ContextOnStack eCtx(request->operationContext);
         CMPI_ObjectPathOnStack eRef(objectPath);  
         CMPI_ResultOnStack eRes(handler,pr.getBroker());         CMPI_ResultOnStack eRes(handler,pr.getBroker());
         CMPI_ThreadContext thr(pr.getBroker(),&eCtx);         CMPI_ThreadContext thr(pr.getBroker(),&eCtx);
         const CString rClass=request->resultClass.getString().getCString();         const CString rClass=request->resultClass.getString().getCString();
         const CString rRole=request->role.getCString();         const CString rRole=request->role.getCString();
         CString nameSpace = request->nameSpace.getString().getCString();         CString nameSpace = request->nameSpace.getString().getCString();
           CString className =
               request->objectName.getClassName().getString().getCString();
  
         CMPIPropertyList props(request->propertyList);         CMPIPropertyList props(request->propertyList);
  
Line 1652 
Line 1629 
             request->includeClassOrigin,             request->includeClassOrigin,
             true);             true);
  
           // make target object path
           SCMOClass* scmoClass =
               mbGetSCMOClass(
                   pr.getBroker(),
                   (const char*)nameSpace,
                   (const char*)className);
           if (0 == scmoClass)
           {
               // This indicates a severe error, since we should't have come
               // here at all, if the class is invalid
               PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL1,
                   "CMPIProviderManager::handleAssociatorsRequest - "
                   "Failed to obtain CIMClass for Namespace: %s  Classname: %s",
                   (const char*) nameSpace,
                   (const char*) className));
   
               CIMException cimException(CIM_ERR_NOT_FOUND);
               throw cimException;
           }
   
           SCMOInstance objectPath(*scmoClass,request->objectName);
           objectPath.setHostName((const char*)System::getHostName().getCString());
           CMPI_ObjectPathOnStack eRef(objectPath);
   
         CMPIProvider::pm_service_op_lock op_lock(&pr);         CMPIProvider::pm_service_op_lock op_lock(&pr);
  
         PEG_TRACE((         PEG_TRACE((
Line 1696 
Line 1697 
                 CMGetCharsPtr(cldata.value.string, NULL)))));                 CMGetCharsPtr(cldata.value.string, NULL)))));
             handler.setContext(response->operationContext);             handler.setContext(response->operationContext);
         }         }
           _throwCIMException(rc, eRes.resError);
         if (rc.rc!=CMPI_RC_OK)  
         {  
             CIMException cimException(  
                 (CIMStatusCode)rc.rc,  
                 rc.msg ? CMGetCharsPtr(rc.msg, NULL) : String::EMPTY);  
   
             if (eRes.resError)  
             {  
                 for (CMPI_Error* currErr=eRes.resError;  
                     currErr!=NULL;  
                     currErr=currErr->nextError)  
                 {  
                     cimException.addError(  
                         ((CIMError*)currErr->hdl)->getInstance());  
                 }  
             }  
             throw cimException;  
         }  
     }     }
     HandlerCatch(handler);     HandlerCatch(handler);
  
Line 1741 
Line 1724 
             (const char*)             (const char*)
                 request->objectName.getClassName().getString().getCString()));                 request->objectName.getClassName().getString().getCString()));
  
         // make target object path  
         CIMObjectPath objectPath(  
             System::getHostName(),  
             request->nameSpace,  
             request->objectName.getClassName());  
   
         objectPath.setKeyBindings(request->objectName.getKeyBindings());  
   
         CIMObjectPath resultPath(  
             System::getHostName(),  
             request->nameSpace,  
             request->resultClass.getString());  
   
         Boolean remote=false;         Boolean remote=false;
         OpProviderHolder ph;         OpProviderHolder ph;
         CString remoteInfo;         CString remoteInfo;
Line 1771 
Line 1741 
  
         CMPIStatus rc={CMPI_RC_OK,NULL};         CMPIStatus rc={CMPI_RC_OK,NULL};
         CMPI_ContextOnStack eCtx(request->operationContext);         CMPI_ContextOnStack eCtx(request->operationContext);
         CMPI_ObjectPathOnStack eRef(objectPath);  
         CMPI_ResultOnStack eRes(handler,pr.getBroker());         CMPI_ResultOnStack eRes(handler,pr.getBroker());
         CMPI_ThreadContext thr(pr.getBroker(),&eCtx);         CMPI_ThreadContext thr(pr.getBroker(),&eCtx);
         const CString rClass=request->resultClass.getString().getCString();         const CString rClass=request->resultClass.getString().getCString();
         const CString rRole=request->role.getCString();         const CString rRole=request->role.getCString();
  
         CString nameSpace = request->nameSpace.getString().getCString();         CString nameSpace = request->nameSpace.getString().getCString();
           CString className =
               request->objectName.getClassName().getString().getCString();
  
         _setupCMPIContexts(         _setupCMPIContexts(
             &eCtx,             &eCtx,
Line 1789 
Line 1760 
             false,             false,
             true);             true);
  
           // make target object path
           SCMOClass* scmoClass =
               mbGetSCMOClass(
                   pr.getBroker(),
                   (const char*)nameSpace,
                   (const char*)className);
           if (0 == scmoClass)
           {
               // This indicates a severe error, since we should't have come
               // here at all, if the class is invalid
               PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL1,
                   "CMPIProviderManager::handleAssociatorNamesRequest - "
                   "Failed to obtain CIMClass for Namespace: %s  Classname: %s",
                   (const char*) nameSpace,
                   (const char*) className));
   
               CIMException cimException(CIM_ERR_NOT_FOUND);
               throw cimException;
           }
   
           SCMOInstance objectPath(*scmoClass,request->objectName);
           objectPath.setHostName((const char*)System::getHostName().getCString());
           CMPI_ObjectPathOnStack eRef(objectPath);
   
         CMPIProvider::pm_service_op_lock op_lock(&pr);         CMPIProvider::pm_service_op_lock op_lock(&pr);
  
         PEG_TRACE((         PEG_TRACE((
Line 1832 
Line 1827 
                 CMGetCharsPtr(cldata.value.string, NULL)))));                 CMGetCharsPtr(cldata.value.string, NULL)))));
             handler.setContext(response->operationContext);             handler.setContext(response->operationContext);
         }         }
           _throwCIMException(rc, eRes.resError);
         if (rc.rc!=CMPI_RC_OK)  
         {  
             CIMException cimException(  
                 (CIMStatusCode)rc.rc,  
                 rc.msg ? CMGetCharsPtr(rc.msg, NULL) : String::EMPTY);  
   
             if (eRes.resError)  
             {  
                 for (CMPI_Error* currErr=eRes.resError;  
                     currErr!=NULL;  
                     currErr=currErr->nextError)  
                 {  
                     cimException.addError(  
                         ((CIMError*)currErr->hdl)->getInstance());  
                 }  
             }  
             throw cimException;  
         }  
     }     }
     HandlerCatch(handler);     HandlerCatch(handler);
  
Line 1877 
Line 1854 
             (const char*)             (const char*)
                 request->instanceName.getClassName().getString().getCString()));                 request->instanceName.getClassName().getString().getCString()));
  
         // make target object path  
         CIMObjectPath objectPath(  
             System::getHostName(),  
             request->nameSpace,  
             request->instanceName.getClassName(),  
             request->instanceName.getKeyBindings());  
   
         Boolean remote=false;         Boolean remote=false;
         OpProviderHolder ph;         OpProviderHolder ph;
         CString remoteInfo;         CString remoteInfo;
Line 1894 
Line 1864 
             &remoteInfo,             &remoteInfo,
             remote);             remote);
  
         CIMObjectPath instanceReference(request->instanceName);  
   
         // ATTN: propagate namespace  
         instanceReference.setNameSpace(request->nameSpace);  
   
         CMPIStatus rc={CMPI_RC_OK,NULL};         CMPIStatus rc={CMPI_RC_OK,NULL};
         CMPI_ContextOnStack eCtx(request->operationContext);         CMPI_ContextOnStack eCtx(request->operationContext);
         CMPI_ObjectPathOnStack eRef(objectPath);  
         CMPI_ResultOnStack eRes(handler,pr.getBroker());         CMPI_ResultOnStack eRes(handler,pr.getBroker());
         CMPI_ThreadContext thr(pr.getBroker(),&eCtx);         CMPI_ThreadContext thr(pr.getBroker(),&eCtx);
         CMPI_ArgsOnStack eArgsIn(request->inParameters);         CMPI_ArgsOnStack eArgsIn(request->inParameters);
Line 1909 
Line 1873 
         CMPI_ArgsOnStack eArgsOut(outArgs);         CMPI_ArgsOnStack eArgsOut(outArgs);
         CString mName=request->methodName.getString().getCString();         CString mName=request->methodName.getString().getCString();
         CString nameSpace = request->nameSpace.getString().getCString();         CString nameSpace = request->nameSpace.getString().getCString();
           CString className = request->className.getString().getCString();
  
         _setupCMPIContexts(         _setupCMPIContexts(
             &eCtx,             &eCtx,
Line 1920 
Line 1885 
             false,             false,
             true);             true);
  
           // make target object path
           SCMOClass* scmoClass =
               mbGetSCMOClass(
                   pr.getBroker(),
                   (const char*)nameSpace,
                   (const char*)className);
           if (0 == scmoClass)
           {
               // This indicates a severe error, since we should't have come
               // here at all, if the class is invalid
               PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL1,
                   "CMPIProviderManager::handleGetInstanceRequest - "
                   "Failed to obtain CIMClass for Namespace: %s  Classname: %s",
                   (const char*) nameSpace,
                   (const char*) className));
   
               CIMException cimException(CIM_ERR_NOT_FOUND);
               throw cimException;
           }
   
           SCMOInstance objectPath(*scmoClass,request->instanceName);
           objectPath.setHostName((const char*)System::getHostName().getCString());
           CMPI_ObjectPathOnStack eRef(objectPath);
   
         CMPIProvider::pm_service_op_lock op_lock(&pr);         CMPIProvider::pm_service_op_lock op_lock(&pr);
  
         PEG_TRACE((         PEG_TRACE((
Line 1964 
Line 1953 
                 CMGetCharsPtr(cldata.value.string, NULL)))));                 CMGetCharsPtr(cldata.value.string, NULL)))));
             handler.setContext(response->operationContext);             handler.setContext(response->operationContext);
         }         }
           _throwCIMException(rc, eRes.resError);
         if (rc.rc!=CMPI_RC_OK)  
         {  
             CIMException cimException(  
                 (CIMStatusCode)rc.rc,  
                 rc.msg ? CMGetCharsPtr(rc.msg, NULL) : String::EMPTY);  
   
             if (eRes.resError)  
             {  
                 for (CMPI_Error* currErr=eRes.resError;  
                     currErr!=NULL;  
                     currErr=currErr->nextError)  
                 {  
                     cimException.addError(  
                         ((CIMError*)currErr->hdl)->getInstance());  
                 }  
             }  
             throw cimException;  
         }  
  
         // Even if external normalization is enabled we don't normalize the         // Even if external normalization is enabled we don't normalize the
         // Embedded instances present in output args. Normalize them here.         // Embedded instances present in output args. Normalize them here.
Line 2133 
Line 2104 
     return className;     return className;
 } }
  
   void CMPIProviderManager::_throwCIMException(
       CMPIStatus rc,
       CMPI_Error* cmpiError)
   {
       if (rc.rc!=CMPI_RC_OK)
       {
           CIMException cimException(
               (CIMStatusCode)rc.rc,
               rc.msg ? CMGetCharsPtr(rc.msg, NULL) : String::EMPTY);
           if (cmpiError)
           {
               for (CMPI_Error* currErr=cmpiError;
                   currErr!=NULL;
                   currErr=currErr->nextError)
               {
                   cimException.addError(
                       ((CIMError*)currErr->hdl)->getInstance());
               }
           }
           throw cimException;
       }
   
   }
   
 Message * CMPIProviderManager::handleCreateSubscriptionRequest( Message * CMPIProviderManager::handleCreateSubscriptionRequest(
     const Message * message)     const Message * message)
 { {
Line 2219 
Line 2214 
             request->operationContext.get(             request->operationContext.get(
             SubscriptionFilterConditionContainer::NAME);             SubscriptionFilterConditionContainer::NAME);
  
         CIMOMHandleQueryContext *_context=          CIMOMHandleQueryContext _context(
             new CIMOMHandleQueryContext(  
             CIMNamespaceName(             CIMNamespaceName(
             request->nameSpace.getString()),             request->nameSpace.getString()),
             *pr.getCIMOMHandle());             *pr.getCIMOMHandle());
  
         CMPI_SelectExp *eSelx=new CMPI_SelectExp(         CMPI_SelectExp *eSelx=new CMPI_SelectExp(
             request->operationContext,             request->operationContext,
             _context,              &_context,
             request->query,             request->query,
             sub_cntr.getQueryLanguage());             sub_cntr.getQueryLanguage());
  
         srec->eSelx=eSelx;         srec->eSelx=eSelx;
         srec->qContext=_context;  
  
         CMPI_ThreadContext thr(pr.getBroker(),&eCtx);         CMPI_ThreadContext thr(pr.getBroker(),&eCtx);
  
         String lang(sub_cntr.getQueryLanguage());         String lang(sub_cntr.getQueryLanguage());
         CString className = _getClassNameFromQuery(         CString className = _getClassNameFromQuery(
             _context,              &_context,
             request->query,             request->query,
             lang).getCString();             lang).getCString();
           CString nameSpace = request->nameSpace.getString().getCString();
  
         CIMObjectPath indClassPath(         CIMObjectPath indClassPath(
             System::getHostName(),             System::getHostName(),
Line 2249 
Line 2243 
  
         eSelx->classNames.append(indClassPath);         eSelx->classNames.append(indClassPath);
  
           SCMOClass* scmoIndClass =
               mbGetSCMOClass(
                   pr.getBroker(),
                   (const char*)nameSpace,
                   (const char*)className);
           if (0 == scmoIndClass)
           {
               // This indicates a severe error, since we should't have
               // come here at all, if the class is invalid
               PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL1,
                   "CMPIProviderManager::handleCreateSubscriptionRequest-"
                   "Failed to obtain CIMClass for Namespace: %s "
                   " Classname: %s",
                   (const char*) nameSpace,
                   (const char*) className));
   
               CIMException cimException(CIM_ERR_NOT_FOUND);
               throw cimException;
           }
   
           SCMOInstance indClassPathSCMO(*scmoIndClass);
           indClassPathSCMO.setHostName(
               (const char*)System::getHostName().getCString());
           eSelx->classNamesSCMO.append(indClassPathSCMO);
   
         CIMPropertyList propertyList = request->propertyList;         CIMPropertyList propertyList = request->propertyList;
         if (!propertyList.isNull())         if (!propertyList.isNull())
         {         {
Line 2263 
Line 2282 
         }         }
  
         Uint16 repeatNotificationPolicy = request->repeatNotificationPolicy;         Uint16 repeatNotificationPolicy = request->repeatNotificationPolicy;
         CString nameSpace = request->nameSpace.getString().getCString();  
  
         // includeQualifiers and includeClassOrigin not of interest for         // includeQualifiers and includeClassOrigin not of interest for
         // this type of request         // this type of request
Line 2291 
Line 2309 
             // filter can be activated for any of the subclasses.             // filter can be activated for any of the subclasses.
             for (Uint32 i = 0, n = request->classNames.size(); i < n; i++)             for (Uint32 i = 0, n = request->classNames.size(); i < n; i++)
             {             {
                   CString subClassName =
                       request->classNames[i].getString().getCString();
   
                   // make target object paths
                 CIMObjectPath classPath(                 CIMObjectPath classPath(
                     System::getHostName(),                     System::getHostName(),
                     request->nameSpace,                     request->nameSpace,
                     request->classNames[i]);                     request->classNames[i]);
  
                 CMPI_ObjectPathOnStack eRef(classPath);                  SCMOClass* scmoClass =
                       mbGetSCMOClass(
                           pr.getBroker(),
                           (const char*)nameSpace,
                           (const char*)subClassName);
                   if (0 == scmoClass)
                   {
                       // This indicates a severe error, since we should't have
                       // come here at all, if the class is invalid
                       PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL1,
                           "CMPIProviderManager::handleCreateSubscriptionRequest-"
                           "Failed to obtain CIMClass for Namespace: %s "
                           " Classname: %s",
                           (const char*) nameSpace,
                           (const char*) className));
   
                       CIMException cimException(CIM_ERR_NOT_FOUND);
                       throw cimException;
                   }
   
                   SCMOInstance classPathSCMO(*scmoClass);
                   classPathSCMO.setHostName(
                       (const char*)System::getHostName().getCString());
                   CMPI_ObjectPathOnStack eRef(classPathSCMO);
  
                 if (pr.getIndMI()->ft->ftVersion >= 100)                 if (pr.getIndMI()->ft->ftVersion >= 100)
                 {                 {
Line 2332 
Line 2377 
                 {                 {
                     filterActivated = true;                     filterActivated = true;
                     eSelx->classNames.append(classPath);                     eSelx->classNames.append(classPath);
                       eSelx->classNamesSCMO.append(classPathSCMO);
   
                 }                 }
                 else                 else
                 {                 {
Line 2376 
Line 2423 
             if (--srec->count<=0)             if (--srec->count<=0)
             {             {
                 selxTab.remove(sPath);                 selxTab.remove(sPath);
                 delete _context;  
                 delete eSelx;                 delete eSelx;
                 delete srec;                 delete srec;
             }             }
Line 2479 
Line 2525 
         };         };
  
         CMPI_SelectExp *eSelx=srec->eSelx;         CMPI_SelectExp *eSelx=srec->eSelx;
         CIMOMHandleQueryContext *qContext=srec->qContext;  
  
         CString className = eSelx->classNames[0].getClassName().         CString className = eSelx->classNames[0].getClassName().
             getString().getCString();             getString().getCString();
Line 2527 
Line 2572 
             // the FROM clause of filter query.             // the FROM clause of filter query.
             for (Uint32 i = 1, n = eSelx->classNames.size(); i < n ; ++i)             for (Uint32 i = 1, n = eSelx->classNames.size(); i < n ; ++i)
             {             {
                 CMPI_ObjectPathOnStack eRef(eSelx->classNames[i]);                  CMPI_ObjectPathOnStack eRef(eSelx->classNamesSCMO[i]);
                 if (pr.getIndMI()->ft->ftVersion >= 100)                 if (pr.getIndMI()->ft->ftVersion >= 100)
                 {                 {
                     rc = pr.getIndMI()->ft->deActivateFilter(                     rc = pr.getIndMI()->ft->deActivateFilter(
Line 2581 
Line 2626 
  
         if (srec->count<=0)         if (srec->count<=0)
         {         {
             delete qContext;  
             delete eSelx;             delete eSelx;
             delete srec;             delete srec;
         }         }
Line 2963 
Line 3007 
                 request->instanceName.getClassName().getString().getCString(),                 request->instanceName.getClassName().getString().getCString(),
             (const char*) request->propertyName.getString().getCString()));             (const char*) request->propertyName.getString().getCString()));
  
         // make target object path  
         CIMObjectPath objectPath(  
             System::getHostName(),  
             request->nameSpace,  
             request->instanceName.getClassName(),  
             request->instanceName.getKeyBindings());  
   
         Boolean remote=false;         Boolean remote=false;
         OpProviderHolder ph;         OpProviderHolder ph;
         CString remoteInfo;         CString remoteInfo;
Line 2987 
Line 3024 
  
         CMPIStatus rc={CMPI_RC_OK,NULL};         CMPIStatus rc={CMPI_RC_OK,NULL};
         CMPI_ContextOnStack eCtx(request->operationContext);         CMPI_ContextOnStack eCtx(request->operationContext);
         CMPI_ObjectPathOnStack eRef(objectPath);  
         CMPI_ResultOnStack eRes(GI_handler,pr.getBroker());         CMPI_ResultOnStack eRes(GI_handler,pr.getBroker());
         CMPI_ThreadContext thr(pr.getBroker(),&eCtx);         CMPI_ThreadContext thr(pr.getBroker(),&eCtx);
  
Line 2996 
Line 3032 
         CMPIPropertyList props(localPropertyList);         CMPIPropertyList props(localPropertyList);
  
         CString nameSpace = request->nameSpace.getString().getCString();         CString nameSpace = request->nameSpace.getString().getCString();
           CString className =
               request->instanceName.getClassName().getString().getCString();
   
         // Leave includeQualifiers and includeClassOrigin as false for this         // Leave includeQualifiers and includeClassOrigin as false for this
         // call to getInstance         // call to getInstance
         _setupCMPIContexts(         _setupCMPIContexts(
Line 3008 
Line 3047 
             false,             false,
             true);             true);
  
           // make target object path
           SCMOClass* scmoClass =
               mbGetSCMOClass(
                   pr.getBroker(),
                   (const char*)nameSpace,
                   (const char*)className);
           if (0 == scmoClass)
           {
               // This indicates a severe error, since we should't have come
               // here at all, if the class is invalid
               PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL1,
                   "CMPIProviderManager::handleGetInstanceRequest - "
                   "Failed to obtain CIMClass for Namespace: %s  Classname: %s",
                   (const char*) nameSpace,
                   (const char*) className));
   
               CIMException cimException(CIM_ERR_NOT_FOUND);
               throw cimException;
           }
   
           SCMOInstance objectPath(*scmoClass,request->instanceName);
           objectPath.setHostName((const char*)System::getHostName().getCString());
           CMPI_ObjectPathOnStack eRef(objectPath);
   
         CMPIProvider::pm_service_op_lock op_lock(&pr);         CMPIProvider::pm_service_op_lock op_lock(&pr);
  
         PEG_TRACE((         PEG_TRACE((
Line 3050 
Line 3113 
                 CMGetCharsPtr(cldata.value.string, NULL)))));                 CMGetCharsPtr(cldata.value.string, NULL)))));
             handler.setContext(response->operationContext);             handler.setContext(response->operationContext);
         }         }
           _throwCIMException(rc, eRes.resError);
         if (rc.rc!=CMPI_RC_OK)  
         {  
             CIMException cimException(  
                 (CIMStatusCode)rc.rc,  
                 rc.msg ? CMGetCharsPtr(rc.msg, NULL) : String::EMPTY);  
   
             if (eRes.resError)  
             {  
                 for (CMPI_Error* currErr=eRes.resError;  
                     currErr!=NULL;  
                     currErr=currErr->nextError)  
                 {  
                     cimException.addError(  
                         ((CIMError*)currErr->hdl)->getInstance());  
                 }  
             }  
             throw cimException;  
         }  
  
         // Copy property value from instance to getProperty response         // Copy property value from instance to getProperty response
         CIMInstance& instance = GI_response->getResponseData().getCimInstance();          Array<SCMOInstance>& arInstance =
               GI_response->getResponseData().getSCMO();
           if (arInstance.size() > 0)
           {
               SCMOInstance& instance = arInstance[0];
         if(!(instance.isUninitialized()))         if(!(instance.isUninitialized()))
         {         {
             Uint32 pos = instance.findProperty(request->propertyName);                  CString pName =
                       request->propertyName.getString().getCString();
   
                   // Construct a temporary CMPI Instance object, on which we
                   // can use the encpsulation functions to retrieve the property.
                   CMPI_InstanceOnStack tmpInst(instance);
   
                   CMPIStatus trc;
                   CMPIData data =
                       CMGetProperty(&tmpInst, (const char*)pName, &trc);
  
             if (pos != PEG_NOT_FOUND)                  if (trc.rc == CMPI_RC_OK)
             {             {
                 response->value = instance.getProperty(pos).getValue();                      // Convert the CMPIData to a CIMValue
                       CIMValue val =
                           value2CIMValue(&(data.value), data.type, &(trc.rc));
   
                       response->value = val;
             }             }
             // Else property not found. Return CIM_ERR_NO_SUCH_PROPERTY.             // Else property not found. Return CIM_ERR_NO_SUCH_PROPERTY.
             else             else
             {             {
                 throw PEGASUS_CIM_EXCEPTION(                 throw PEGASUS_CIM_EXCEPTION(
                     CIM_ERR_NO_SUCH_PROPERTY,                     CIM_ERR_NO_SUCH_PROPERTY,
                     request->propertyName.getString()                          request->propertyName.getString());
                     );                  }
             }             }
         }         }
     }     }
Line 3151 
Line 3213 
  
     try     try
     {     {
           CString nameSpace = request->nameSpace.getString().getCString();
           CString className =
               request->instanceName.getClassName().getString().getCString();
   
         PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL3,         PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL3,
             "CMPIProviderManager::handleSetPropertyRequest"             "CMPIProviderManager::handleSetPropertyRequest"
             " - Host name: %s  Name space: %s  "             " - Host name: %s  Name space: %s  "
                 "Class name: %s  Property name: %s",                 "Class name: %s  Property name: %s",
             (const char*) System::getHostName().getCString(),             (const char*) System::getHostName().getCString(),
             (const char*) request->nameSpace.getString().getCString(),              (const char*) nameSpace,
             (const char*)              (const char*) className,
                 request->instanceName.getClassName().getString().getCString(),  
             (const char*) request->propertyName.getString().getCString()));             (const char*) request->propertyName.getString().getCString()));
  
         // make target object path  
         CIMObjectPath objectPath(  
             System::getHostName(),  
             request->nameSpace,  
             request->instanceName.getClassName(),  
             request->instanceName.getKeyBindings());  
   
         Boolean remote=false;         Boolean remote=false;
         OpProviderHolder ph;         OpProviderHolder ph;
         CString remoteInfo;         CString remoteInfo;
Line 3180 
Line 3238 
  
         CMPIStatus rc={CMPI_RC_OK,NULL};         CMPIStatus rc={CMPI_RC_OK,NULL};
         CMPI_ContextOnStack eCtx(request->operationContext);         CMPI_ContextOnStack eCtx(request->operationContext);
         CMPI_ObjectPathOnStack eRef(objectPath);  
         CMPI_ResultOnStack eRes(MI_handler,pr.getBroker());         CMPI_ResultOnStack eRes(MI_handler,pr.getBroker());
         CMPI_InstanceOnStack eInst(localModifiedInstance);  
         CMPI_ThreadContext thr(pr.getBroker(),&eCtx);         CMPI_ThreadContext thr(pr.getBroker(),&eCtx);
  
         CMPIPropertyList props(localPropertyList);         CMPIPropertyList props(localPropertyList);
         CString nameSpace = request->nameSpace.getString().getCString();  
  
         // Leave includeQualifiers as false for this call to modifyInstance         // Leave includeQualifiers as false for this call to modifyInstance
         _setupCMPIContexts(         _setupCMPIContexts(
Line 3199 
Line 3254 
             false,             false,
             true);             true);
  
           // make target object path
           SCMOClass* scmoClass =
               mbGetSCMOClass(
                   pr.getBroker(),
                   (const char*)nameSpace,
                   (const char*)className);
           if (0 == scmoClass)
           {
               // This indicates a severe error, since we should't have come
               // here at all, if the class is invalid
               PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL1,
                   "CMPIProviderManager::handleGetInstanceRequest - "
                   "Failed to obtain CIMClass for Namespace: %s  Classname: %s",
                   (const char*) nameSpace,
                   (const char*) className));
   
               CIMException cimException(CIM_ERR_NOT_FOUND);
               throw cimException;
           }
   
           SCMOInstance modInst(*scmoClass, localModifiedInstance);
           modInst.setHostName((const char*)System::getHostName().getCString());
           modInst.setPropertyFilter((const char **)props.getList());
           CMPI_ObjectPathOnStack eRef(modInst);
           CMPI_InstanceOnStack eInst(modInst);
   
         CMPIProvider::pm_service_op_lock op_lock(&pr);         CMPIProvider::pm_service_op_lock op_lock(&pr);
  
         PEG_TRACE((         PEG_TRACE((
Line 3242 
Line 3323 
                 CMGetCharsPtr(cldata.value.string, NULL)))));                 CMGetCharsPtr(cldata.value.string, NULL)))));
             handler.setContext(response->operationContext);             handler.setContext(response->operationContext);
         }         }
           _throwCIMException(rc, eRes.resError);
         if (rc.rc!=CMPI_RC_OK)  
         {  
             CIMException cimException(  
                 (CIMStatusCode)rc.rc,  
                 rc.msg ? CMGetCharsPtr(rc.msg, NULL) : String::EMPTY);  
   
             if (eRes.resError)  
             {  
                 for (CMPI_Error* currErr=eRes.resError;  
                     currErr!=NULL;  
                     currErr=currErr->nextError)  
                 {  
                     cimException.addError(  
                         ((CIMError*)currErr->hdl)->getInstance());  
                 }  
             }  
             throw cimException;  
         }  
     }     }
     HandlerCatch(handler);     HandlerCatch(handler);
  


Legend:
Removed from v.1.157  
changed lines
  Added in v.1.157.2.7

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2