Merge branch '1.3-rel' (5fdb8a1)
[iotivity.git] / service / notification / src / provider / NSProviderSubscription.c
index b186599..c2df9b1 100644 (file)
@@ -101,7 +101,6 @@ NSResult NSSendAccessPolicyResponse(OCEntityHandlerRequest *entityHandlerRequest
     OCRepPayloadSetPropString(payload, NS_ATTRIBUTE_TOPIC, NS_COLLECTION_TOPIC_URI);\r
 \r
     response.requestHandle = entityHandlerRequest->requestHandle;\r
-    response.resourceHandle = entityHandlerRequest->resource;\r
     response.persistentBufferFlag = 0;\r
     response.ehResult = OC_EH_OK;\r
     response.payload = (OCPayload *) payload;\r
@@ -207,7 +206,7 @@ void NSHandleSubscription(OCEntityHandlerRequest *entityHandlerRequest, NSResour
         element->data = (void*) subData;\r
         element->next = NULL;\r
 \r
-        if (NSProviderStorageWrite(consumerSubList, element) != NS_OK)\r
+        if (NS_OK != NSProviderStorageWrite(consumerSubList, element))\r
         {\r
             NS_LOG(ERROR, "Fail to write cache");\r
         }\r