From: Harish Kumara M Date: Wed, 26 Dec 2018 11:56:34 +0000 (+0530) Subject: Fix deleting request on slow response X-Git-Tag: accepted/tizen/unified/20190128.061218~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F85%2F196285%2F1;p=platform%2Fupstream%2Fiotivity.git Fix deleting request on slow response 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 Signed-off-by: Amit KS --- diff --git a/resource/csdk/stack/src/ocresource.c b/resource/csdk/stack/src/ocresource.c index 8abd4b3..622f43d 100755 --- a/resource/csdk/stack/src/ocresource.c +++ b/resource/csdk/stack/src/ocresource.c @@ -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; }