Bug fixing related to slow response server
authorhyuna0213.jo <hyuna0213.jo@samsung.com>
Tue, 29 Mar 2016 02:22:03 +0000 (11:22 +0900)
committerMadan Lanka <lanka.madan@samsung.com>
Tue, 29 Mar 2016 04:52:46 +0000 (04:52 +0000)
Change-Id: Id0cc88362af1067003b76ebda8322e409063a38c
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/7417
Reviewed-by: jihwan seo <jihwan.seo@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: JungYong KIM <jyong2.kim@samsung.com>
Reviewed-by: Markus Jung <markus.jung85@gmail.com>
Reviewed-by: Madan Lanka <lanka.madan@samsung.com>
resource/csdk/stack/src/ocstack.c

index 0f0d536..89c2bc1 100644 (file)
@@ -1788,10 +1788,13 @@ void OCHandleRequests(const CAEndpoint_t* endPoint, const CARequestInfo_t* reque
     requestResult = HandleStackRequests (&serverRequest);
 
     // Send ACK to client as precursor to slow response
-    if (requestResult == OC_STACK_SLOW_RESOURCE && requestInfo->info.type == CA_MSG_CONFIRM)
+    if (requestResult == OC_STACK_SLOW_RESOURCE)
     {
-        SendDirectStackResponse(endPoint, requestInfo->info.messageId, CA_EMPTY,
-                                CA_MSG_ACKNOWLEDGE,0, NULL, NULL, 0, NULL);
+        if (requestInfo->info.type == CA_MSG_CONFIRM)
+        {
+            SendDirectStackResponse(endPoint, requestInfo->info.messageId, CA_EMPTY,
+                                    CA_MSG_ACKNOWLEDGE,0, NULL, NULL, 0, NULL);
+        }
     }
     else if(requestResult != OC_STACK_OK)
     {