[IOT-1444] Enabling handling observe requests for collection resource.
authorHarish Kumara Marappa <h.marappa@samsung.com>
Wed, 12 Oct 2016 09:39:42 +0000 (18:39 +0900)
committerAshok Babu Channa <ashok.channa@samsung.com>
Fri, 14 Oct 2016 06:06:17 +0000 (06:06 +0000)
Change-Id: If72f5a85858240787dea2b307710f1167c14c68a
Signed-off-by: Harish Kumara Marappa <h.marappa@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/13149
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Abhishek Pandey <abhi.siso@samsung.com>
Reviewed-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-by: Hun-je Yeon <hunje.yeon@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
(cherry picked from commit aa9cdad0a3937ae0e8538cbc8f6c48a1a52cde9a)
Reviewed-on: https://gerrit.iotivity.org/gerrit/13161

resource/csdk/stack/src/ocresource.c

index 00ee331862c573a53d9a473005049afa9dd86a83..1c6b2986d018d2bf83ee359149441bda43d489a8 100755 (executable)
@@ -1007,7 +1007,7 @@ HandleResourceWithEntityHandler (OCServerRequest *request,
         OIC_LOG(INFO, TAG, "No observation requested");
         ehFlag = OC_REQUEST_FLAG;
     }
-    else if(ehRequest.obsInfo.action == OC_OBSERVE_REGISTER && !collectionResource)
+    else if(ehRequest.obsInfo.action == OC_OBSERVE_REGISTER)
     {
         OIC_LOG(INFO, TAG, "Observation registration requested");
 
@@ -1062,8 +1062,7 @@ HandleResourceWithEntityHandler (OCServerRequest *request,
         }
 
     }
-    else if(ehRequest.obsInfo.action == OC_OBSERVE_DEREGISTER &&
-            !collectionResource)
+    else if(ehRequest.obsInfo.action == OC_OBSERVE_DEREGISTER)
     {
         OIC_LOG(INFO, TAG, "Deregistering observation requested");