From: hyuna0213.jo Date: Mon, 28 Mar 2016 07:29:45 +0000 (+0900) Subject: Problem regarding NON request on Slow Response server X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=76e3cb4759dfd230430ec5734383104d76df7f77;p=contrib%2Fiotivity.git Problem regarding NON request on Slow Response server When a slow responding server receives a NON type request, it is sending back an ACK message immediately, and then later, sending NON response. According to RFC-7252, response of NON request should only be a NON, there should not be any ACK in between. Change-Id: I0b00c2423660d622df8490bf03011d18a1c26126 Signed-off-by: hyuna0213.jo Reviewed-on: https://gerrit.iotivity.org/gerrit/7385 Reviewed-by: jihwan seo Tested-by: jenkins-iotivity Reviewed-by: Ashok Babu Channa --- diff --git a/resource/csdk/stack/src/ocstack.c b/resource/csdk/stack/src/ocstack.c index 65b931d..0f0d536 100644 --- a/resource/csdk/stack/src/ocstack.c +++ b/resource/csdk/stack/src/ocstack.c @@ -1788,10 +1788,10 @@ 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) + if (requestResult == OC_STACK_SLOW_RESOURCE && requestInfo->info.type == CA_MSG_CONFIRM) { SendDirectStackResponse(endPoint, requestInfo->info.messageId, CA_EMPTY, - CA_MSG_ACKNOWLEDGE,0, NULL, NULL, 0, NULL); + CA_MSG_ACKNOWLEDGE,0, NULL, NULL, 0, NULL); } else if(requestResult != OC_STACK_OK) {