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

Diff for /pegasus/src/Pegasus/Server/WQLOperationRequestDispatcher.cpp between version 1.48 and 1.49

version 1.48, 2013/05/01 23:20:09 version 1.49, 2013/06/29 17:55:08
Line 60 
Line 60 
                 //                 //
                 qs->applyProjection(a[i], true);                 qs->applyProjection(a[i], true);
             }             }
             else a.remove(i);  
         }  
         catch (...)  
         {  
             a.remove(i);  
         }  
     }  
 }  
   
 void WQLOperationRequestDispatcher::handleQueryResponseAggregation(  
     OperationAggregate* poA)  
 {  
     PEG_METHOD_ENTER(TRC_DISPATCHER,  
         "WQLOperationRequestDispatcher::handleQueryResponseAggregation");  
   
     Uint32 numberResponses = poA->numberResponses();  
   
     PEG_TRACE((  
         TRC_DISPATCHER,  
         Tracer::LEVEL4,  
         "WQLOperationRequestDispatcher::ExecQuery Response - "  
             "Name Space: %s  Class name: %s Response Count: %u",  
         CSTRING(poA->_nameSpace.getString()),  
         CSTRING(poA->_className.getString()),  
         numberResponses));  
   
     if (numberResponses == 0)  
         return;  
   
     CIMResponseMessage* response = poA->getResponse(0);  
     CIMExecQueryResponseMessage* toResponse = 0;  
     Uint32 startIndex = 0;  
     Uint32 endIndex = numberResponses - 1;  
     Boolean manyResponses = true;  
     if (response->getType() == CIM_ENUMERATE_INSTANCES_RESPONSE_MESSAGE)  
     {  
         // Create an ExecQuery response from an EnumerateInstances request  
         CIMOperationRequestMessage* request = poA->getRequest();  
         AutoPtr<CIMExecQueryResponseMessage> query(  
             new CIMExecQueryResponseMessage(  
                 request->messageId,  
                 CIMException(),  
                 request->queueIds.copyAndPop()));  
         query->syncAttributes(request);  
         toResponse = query.release();  
     }  
     else     else
     {     {
         toResponse = (CIMExecQueryResponseMessage*) response;                  a.remove(i);
         manyResponses = false;  
     }  
   
     // Work backward and delete each response off the end of the array  
     for (Uint32 i = endIndex; i >= startIndex; i--)  
     {  
         if (manyResponses)  
             response = poA->getResponse(i);  
   
         if (response->getType() == CIM_ENUMERATE_INSTANCES_RESPONSE_MESSAGE)  
         {  
             // convert enumerate instances responses to exec query responses  
             applyQueryToEnumeration(response, poA->_query);  
             CIMEnumerateInstancesResponseMessage* fromResponse =  
                 (CIMEnumerateInstancesResponseMessage*) response;  
             CIMClass cimClass;  
   
             Boolean clsRead=false;  
             Array<CIMInstance>& a =  
                 fromResponse->getResponseData().getInstances();  
             for (Uint32 j = 0, m = a.size();  
                  j < m; j++)  
             {  
                 CIMObject co=CIMObject(a[j]);  
                 CIMObjectPath op=co.getPath();  
                 const Array<CIMKeyBinding>& kbs=op.getKeyBindings();  
                 if (kbs.size() == 0)  
                 {     // no path set why ?  
                     if (clsRead == false)  
                     {  
                         cimClass = _repository->getClass(  
                             poA->_nameSpace, op.getClassName(),  
                             false,true,false, CIMPropertyList());  
                         clsRead=true;  
                     }  
                     op = a[j].buildPath(cimClass);  
                 }  
                 op.setNameSpace(poA->_nameSpace);  
                 op.setHost(System::getHostName());  
                 co.setPath(op);  
                 if (manyResponses)  
                     toResponse->getResponseData().appendObject(co);  
             }             }
         }         }
         else          catch (...)
         {  
             CIMExecQueryResponseMessage* fromResponse =  
                 (CIMExecQueryResponseMessage*) response;  
   
             CIMResponseData & from = fromResponse->getResponseData();  
             from.completeHostNameAndNamespace(  
                 System::getHostName(),  
                 poA->_nameSpace);  
   
             if (manyResponses)  
             {             {
                 toResponse->getResponseData().appendResponseData(from);              a.remove(i);
             }             }
         }         }
         if (manyResponses)  
         {  
             poA->deleteResponse(i);  
         }  
   
         if (i == 0)  
             break;  
     } // for all responses in response list  
   
     // if we started with an enumerateInstances repsonse, then add it to overall  
     if ((startIndex == 0) && manyResponses)  
         poA->appendResponse(toResponse);  
   
     PEG_METHOD_EXIT();  
 } }
  
 void WQLOperationRequestDispatcher::handleQueryRequest( void WQLOperationRequestDispatcher::handleQueryRequest(
Line 292 
Line 180 
  
     // Set the number of expected responses in the OperationAggregate     // Set the number of expected responses in the OperationAggregate
     Uint32 numClasses = providerInfos.size();     Uint32 numClasses = providerInfos.size();
     /// KS _ Should we have to do this???  
     poA->_nameSpace=request->nameSpace;     poA->_nameSpace=request->nameSpace;
  
     if (_repository->isDefaultInstanceProvider())     if (_repository->isDefaultInstanceProvider())
Line 421 
Line 309 
                 context->insert(*providerIdContainer);                 context->insert(*providerIdContainer);
  
             context->insert(identityContainer);             context->insert(identityContainer);
   
             _forwardRequestForAggregation(             _forwardRequestForAggregation(
                  providerInfo.serviceId,                  providerInfo.serviceId,
                  providerInfo.controlProviderName,                  providerInfo.controlProviderName,


Legend:
Removed from v.1.48  
changed lines
  Added in v.1.49

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2