Fix deleting request on slow response 90/196290/1
authorHarish Kumara M <h.marappa@samsung.com>
Wed, 26 Dec 2018 11:56:34 +0000 (17:26 +0530)
committerAmit KS <amit.s12@samsung.com>
Thu, 27 Dec 2018 03:49:34 +0000 (09:19 +0530)
Server request is getting deleted when observe request
received again with same previous request token even
the new server request is not being added to sever request
list. Duplicate requests with same token are expected when
when ACK for the first request is not reached at client side.

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/383
(cherry picked from commit f6dfbd5194a482f2611a7b23c904dd4f7533c809)

Change-Id: I97968ae99a0abca39eb1bbe860cbfe73f684a738
Signed-off-by: Harish Kumara M <h.marappa@samsung.com>
Signed-off-by: Amit KS <amit.s12@samsung.com>
resource/csdk/stack/src/ocresource.c

index 8abd4b3..622f43d 100755 (executable)
@@ -1227,11 +1227,6 @@ HandleResourceWithEntityHandler(OCServerRequest *request,
             OIC_LOG (INFO, TAG, "Not adding observer. Not responding to client");
             OIC_LOG (INFO, TAG, "The first request for this token is already ACKED.");
 
-            // server requests are usually free'd when the response is sent out
-            // for the request in ocserverrequest.c : HandleSingleResponse()
-            // Since we are making an early return and not responding, the server request
-            // needs to be deleted.
-            FindAndDeleteServerRequest (request);
             FreeObserver(obs);
             return OC_STACK_OK;
         }