Fix regression on confirm-able messages.
authorStephane Lejeune <stlejeun@cisco.com>
Tue, 8 Sep 2015 10:07:05 +0000 (12:07 +0200)
committerJon A. Cruz <jonc@osg.samsung.com>
Wed, 9 Sep 2015 19:28:09 +0000 (19:28 +0000)
MessageID should not be updated with the BlockID when the transfer is
not using the block-tranfer mechanism. This unnecessary update was
causing an error that prevented the pdu to be transmited normally.

Change-Id: I5927a636fb05f77fb2aa085e92b6f362e6e2a69e
Signed-off-by: Stephane Lejeune <stlejeun@cisco.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/2402
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Hyuna Jo <hyuna0213.jo@samsung.com>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
resource/csdk/connectivity/src/cablockwisetransfer.c

index c534077..ebf02b6 100644 (file)
@@ -1444,6 +1444,8 @@ CAResult_t CAAddBlockOption(coap_pdu_t **pdu, const CAInfo_t info,
         else
         {
             OIC_LOG(INFO, TAG, "not Blockwise Transfer");
+            CADestroyBlockID(blockDataID);
+            return CA_STATUS_OK;
         }
     }