Commit 0b28ea64 authored by Habib Virji's avatar Habib Virji Committed by Phil Coval

Add p in response of oic.if.ll

In collection response add p parameter.
This is the response in case of default entity handler.
Application has to handle on its own adding policy parameter.

Change-Id: Ie2195eb07575fbcc34413fca729a1a7db0805314
Signed-off-by: default avatarHabib Virji <habib.virji@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14703Tested-by: default avatarjenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: default avatarUze Choi <uzchoi@samsung.com>
Tested-by: default avatarUze Choi <uzchoi@samsung.com>
(cherry picked from commit b19d0805)
Reviewed-on: https://gerrit.iotivity.org/gerrit/14699Reviewed-by: default avatarPhil Coval <philippe.coval@osg.samsung.com>
parent 9705d8cb
...@@ -387,6 +387,12 @@ OCStackResult BuildResponseRepresentation(const OCResource *resourcePtr, ...@@ -387,6 +387,12 @@ OCStackResult BuildResponseRepresentation(const OCResource *resourcePtr,
resAttrib = resAttrib->next; resAttrib = resAttrib->next;
} }
OCResourceProperty p = OCGetResourceProperties((OCResourceHandle *)resourcePtr);
p = (OCResourceProperty) ((p & OC_DISCOVERABLE) | (p & OC_OBSERVABLE));
OCRepPayload *policy = OCRepPayloadCreate();
OCRepPayloadSetPropInt(policy, OC_RSRVD_BITMAP, p);
OCRepPayloadSetPropObjectAsOwner(tempPayload, OC_RSRVD_POLICY, policy);
if(!*payload) if(!*payload)
{ {
*payload = tempPayload; *payload = tempPayload;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment