Update snapshot(2017-12-06)
[platform/upstream/iotivity.git] / resource / csdk / connectivity / src / camessagehandler.c
index bb9d829..2abb152 100755 (executable)
@@ -201,7 +201,8 @@ static CAData_t* CAGenerateHandlerData(const CAEndpoint_t *endpoint,
             goto exit;
         }
 
-        if (CADropSecondMessage(&caglobals.ca.requestHistory, endpoint, reqInfo->info.messageId,
+        if ((reqInfo->info.type != CA_MSG_CONFIRM) &&
+            CADropSecondMessage(&caglobals.ca.requestHistory, endpoint, reqInfo->info.messageId,
                                 reqInfo->info.token, reqInfo->info.tokenLength))
         {
             OIC_LOG(INFO, TAG, "Second Request with same Token, Drop it");
@@ -894,6 +895,8 @@ static void CAAdapterStateChangedCallback(CATransportAdapter_t transportType, bo
 
 static bool CAClearQueueEndpointDataContext(void *data, uint32_t size, void *ctx)
 {
+    (void)size;
+
     if (NULL == data || NULL == ctx)
     {
         return false;
@@ -1271,6 +1274,8 @@ CAResult_t CAInitializeMessageHandler(CATransportAdapter_t transportType)
 
 static bool CAClearQueueAdapterDataContext(void *data, uint32_t size, void *ctx)
 {
+    (void)size;
+
     if (NULL == data || NULL == ctx)
     {
         return false;