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

Diff for /pegasus/src/Pegasus/ProviderManager2/CMPI/CMPI_Broker.cpp between version 1.27 and 1.28

version 1.27, 2006/01/30 16:18:04 version 1.28, 2006/01/30 16:43:55
Line 268 
Line 268 
          CM_ClassOrigin(flgs),          CM_ClassOrigin(flgs),
          props);          props);
          if (rc) CMSetStatus(rc,CMPI_RC_OK);          if (rc) CMSetStatus(rc,CMPI_RC_OK);
          CMPI_Object *obj =  
              new CMPI_Object(new CMPI_InstEnumeration(new Array<CIMInstance>(en)));           // Workaround for bugzilla 4677
            // When running out of process the returned instances don't contain
            // a name space. Create a writable copy of the array and add the
            // namespace from the input parameters.
            Array<CIMInstance> * aInst = new Array<CIMInstance>(en);
            for (unsigned int index=0;index < aInst->size(); index++)
            {
                CIMInstance& myInst = (*aInst)[index];
                CIMObjectPath orgCop = myInst.getPath();
                orgCop.setNameSpace(CM_ObjectPath(cop)->getNameSpace());
                (*aInst)[index].setPath(orgCop);
            }
   
            CMPI_Object *obj = new CMPI_Object(new CMPI_InstEnumeration(aInst));
   
            /*CMPI_Object *obj =
                new CMPI_Object(new CMPI_InstEnumeration(new Array<CIMInstance>(en)));*/
            // End of workaround for bugzilla 4677
   
          return (CMPI_InstEnumeration*)obj->getHdl();          return (CMPI_InstEnumeration*)obj->getHdl();
  
       }       }
Line 334 
Line 352 
          CM_ClassOrigin(flgs),          CM_ClassOrigin(flgs),
          props);          props);
          if (rc) CMSetStatus(rc,CMPI_RC_OK);          if (rc) CMSetStatus(rc,CMPI_RC_OK);
          CMPI_Object *obj =  
              new CMPI_Object(new CMPI_ObjEnumeration(new Array<CIMObject>(en)));           // Workaround for bugzilla 4677
            // When running out of process the returned instances don't contain
            // a name space. Create a writable copy of the array and add the
            // namespace from the input parameters.
            Array<CIMObject> * aInst = new Array<CIMObject>(en);
            for (unsigned int index=0;index < aInst->size(); index++)
            {
                CIMObject& myInst = (*aInst)[index];
                CIMObjectPath orgCop = myInst.getPath();
                orgCop.setNameSpace(CM_ObjectPath(cop)->getNameSpace());
                (*aInst)[index].setPath(orgCop);
            }
   
            CMPI_Object *obj = new CMPI_Object(new CMPI_ObjEnumeration(aInst));
   
            /*CMPI_Object *obj =
                   new CMPI_Object(new CMPI_ObjEnumeration(new Array<CIMObject>(en)));*/
            // End of workaround for bugzilla 4677
   
          return (CMPI_ObjEnumeration *)obj->getHdl();          return (CMPI_ObjEnumeration *)obj->getHdl();
  
       }       }
Line 408 
Line 444 
          CM_ClassOrigin(flgs),          CM_ClassOrigin(flgs),
          props);          props);
          if (rc) CMSetStatus(rc,CMPI_RC_OK);          if (rc) CMSetStatus(rc,CMPI_RC_OK);
          CMPI_Object *obj =           // Workaround for bugzilla 4677
              new CMPI_Object(new CMPI_ObjEnumeration(new Array<CIMObject>(en)));           // When running out of process the returned instances don't contain
            // a name space. Create a writable copy of the array and add the
            // namespace from the input parameters.
            Array<CIMObject> * aInst = new Array<CIMObject>(en);
            for (unsigned int index=0;index < aInst->size(); index++)
            {
                CIMObject& myInst = (*aInst)[index];
                CIMObjectPath orgCop = myInst.getPath();
                orgCop.setNameSpace(CM_ObjectPath(cop)->getNameSpace());
                (*aInst)[index].setPath(orgCop);
            }
   
            CMPI_Object *obj = new CMPI_Object(new CMPI_ObjEnumeration(aInst));
   
            /*CMPI_Object *obj =
                   new CMPI_Object(new CMPI_ObjEnumeration(new Array<CIMObject>(en)));*/
            // End of workaround for bugzilla 4677
   
          return (CMPI_ObjEnumeration *)obj->getHdl();          return (CMPI_ObjEnumeration *)obj->getHdl();
       }       }
       catch (const CIMException &e) {       catch (const CIMException &e) {


Legend:
Removed from v.1.27  
changed lines
  Added in v.1.28

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2