[IOT-3055]Fixed Handle collection resource payload
[iotivity.git] / resource / csdk / stack / src / ocserverrequest.c
index d1224e6..6e3e85a 100644 (file)
@@ -875,9 +875,10 @@ OCStackResult HandleAggregateResponse(OCEntityHandlerResponse * ehResponse)
 
         OCRepPayload *newPayload = OCRepPayloadBatchClone((OCRepPayload *)ehResponse->payload);
 
+        OCRepPayloadSetPayloadRepType(newPayload, PAYLOAD_REP_ARRAY);
+
         if(!serverResponse->payload)
         {
-            OCRepPayloadSetInterfaceType(newPayload, PAYLOAD_BATCH_INTERFACE);
             serverResponse->payload = (OCPayload *)newPayload;
         }
         else