added error handling logic about the message transmission fail in CA
authorhyuna0213.jo <hyuna0213.jo@samsung.com>
Tue, 5 Apr 2016 08:29:57 +0000 (17:29 +0900)
committerAshok Babu Channa <ashok.channa@samsung.com>
Tue, 5 Apr 2016 13:26:57 +0000 (13:26 +0000)
If CA fail to add data to pdu, CA have to send the error message
to RI Layer using error callback.

Change-Id: I02ee617b7537c96a800b35c4319b15bcbafd44f8
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/7609
Reviewed-by: jihwan seo <jihwan.seo@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
resource/csdk/connectivity/src/cablockwisetransfer.c

index c93ca1c..f214067 100644 (file)
@@ -1439,6 +1439,8 @@ CAResult_t CAAddBlockOption(coap_pdu_t **pdu, const CAInfo_t *info,
         if (!coap_add_data(*pdu, dataLength, (const unsigned char *) info->payload))
         {
             OIC_LOG(INFO, TAG, "it have to use block");
+            res = CA_STATUS_FAILED;
+            goto exit;
         }
         else
         {