Made requesting instance's allocation count for resource available via the service...
[keystone-rtos/rm-lld.git] / src / rm_services.c
index 2b0355f2fb3ee4c91028101d7adbe7cf31fe94e4..a2d13e79fd6e013c6892345b388f3d4991c566fb 100644 (file)
@@ -130,7 +130,8 @@ void Rm_serviceHandler (void *rmHandle, const Rm_ServiceReqInfo *serviceRequest,
         transaction->resourceInfo.base = serviceRequest->resourceBase;
         transaction->resourceInfo.length = serviceRequest->resourceLength;
         transaction->resourceInfo.alignment = serviceRequest->resourceAlignment;
-        transaction->resourceInfo.ownerCount = RM_RESOURCE_NUM_OWNERS_INVALID;        
+        transaction->resourceInfo.ownerCount = RM_RESOURCE_NUM_OWNERS_INVALID;
+        transaction->resourceInfo.instAllocCount = RM_INST_ALLOC_COUNT_INVALID;
         if (serviceRequest->resourceNsName) {
             strncpy(transaction->resourceInfo.nameServerName, serviceRequest->resourceNsName, RM_NAME_MAX_CHARS);
         }
@@ -155,9 +156,9 @@ void Rm_serviceHandler (void *rmHandle, const Rm_ServiceReqInfo *serviceRequest,
 
             serviceResponse->rmHandle = rmHandle;
             serviceResponse->serviceState = transaction->state;
-            /* Owner count will only be set within RM under certain circumstances.  Most of time
-             * it will be RM_RESOURCE_NUM_OWNERS_INVALID */
+            /* Owner and instance allocation count will only be set within RM under certain circumstances. */
             serviceResponse->resourceNumOwners = transaction->resourceInfo.ownerCount;
+            serviceResponse->instAllocCount = transaction->resourceInfo.instAllocCount;
             if ((serviceResponse->serviceState == RM_SERVICE_PROCESSING) ||
                 (serviceResponse->serviceState == RM_SERVICE_APPROVED_STATIC) ||
                 (serviceResponse->serviceState == RM_SERVICE_PENDING_SERVER_RESPONSE)) {