summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHongkuk, Son <hongkuk.son@samsung.com>2017-10-10 16:47:00 +0900
committerHongkuk, Son <hongkuk.son@samsung.com>2017-10-10 16:47:22 +0900
commit938a6db6f152a42597aff193cf050024349a578f (patch)
tree070ca3d57aab4311635f2d8cf1a7d234e7ae7165
parent3c093548382bb2542c87a67e6e5fa32552c29cb3 (diff)
downloadiotivity-938a6db6f152a42597aff193cf050024349a578f.tar.gz
iotivity-938a6db6f152a42597aff193cf050024349a578f.tar.bz2
iotivity-938a6db6f152a42597aff193cf050024349a578f.zip
Update snapshot(2017-10-04)
Signed-off-by: Hongkuk, Son <hongkuk.son@samsung.com> Change-Id: Idf480dc4361b14c8902e15f74ca253a55b2f3e1e
-rwxr-xr-xpackaging/snapshot_history.txt6
-rwxr-xr-xresource/csdk/connectivity/api/cacommon.h10
-rw-r--r--resource/csdk/connectivity/common/src/caremotehandler.c5
-rw-r--r--resource/csdk/connectivity/inc/caretransmission.h6
-rw-r--r--resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c4
-rwxr-xr-xresource/csdk/connectivity/src/bt_le_adapter/caleadapter.c131
-rwxr-xr-x[-rw-r--r--]resource/csdk/connectivity/src/cablockwisetransfer.c1
-rwxr-xr-xresource/csdk/connectivity/src/camessagehandler.c9
-rw-r--r--resource/csdk/connectivity/src/caretransmission.c16
9 files changed, 136 insertions, 52 deletions
diff --git a/packaging/snapshot_history.txt b/packaging/snapshot_history.txt
index 32b684b93..baf3b592c 100755
--- a/packaging/snapshot_history.txt
+++ b/packaging/snapshot_history.txt
@@ -1,3 +1,9 @@
+http://suprem.sec.samsung.net/jira/browse/CONPRO-1102
+
+commit_info_2017-10-04-rev1.txt
+
+commit_id: 43892977769486782b5b0475cc0343c875a4dca1
+----------------------------------------------------------------------------------------------------------------------------------
http://suprem.sec.samsung.net/jira/browse/CONPRO-1098
commit_info_2017-09-27-rev1.txt
diff --git a/resource/csdk/connectivity/api/cacommon.h b/resource/csdk/connectivity/api/cacommon.h
index fc47ed1be..e10669ec5 100755
--- a/resource/csdk/connectivity/api/cacommon.h
+++ b/resource/csdk/connectivity/api/cacommon.h
@@ -59,11 +59,11 @@ extern "C"
/**
* TAG of Analyzer log.
*/
-#define ANALYZER_TAG "OIC_CA_ANALYZER_071801"
-#define BLE_CLIENT_TAG "OIC_CA_LE_CLIENT_0718"
-#define BLE_SERVER_MCD_TAG "OIC_CA_LE_SER_MC_0718"
-#define IP_SERVER_TAG "OIC_CA_IP_SERVER_0718"
-#define TCP_SERVER_TAG "OIC_CA_TCP_SERVER_0718"
+#define ANALYZER_TAG "OIC_CA_ANALYZER_092601"
+#define BLE_CLIENT_TAG "OIC_CA_LE_CLIENT_0926"
+#define BLE_SERVER_MCD_TAG "OIC_CA_LE_SER_MC_0926"
+#define IP_SERVER_TAG "OIC_CA_IP_SERVER_0926"
+#define TCP_SERVER_TAG "OIC_CA_TCP_SERVER_0926"
/**
* IP address Length.
diff --git a/resource/csdk/connectivity/common/src/caremotehandler.c b/resource/csdk/connectivity/common/src/caremotehandler.c
index deccb3dd3..3b99e12b9 100644
--- a/resource/csdk/connectivity/common/src/caremotehandler.c
+++ b/resource/csdk/connectivity/common/src/caremotehandler.c
@@ -183,6 +183,11 @@ void CAFreeEndpoint(CAEndpoint_t *rep)
static void CADestroyInfoInternal(CAInfo_t *info)
{
+ if (NULL == info)
+ {
+ return;
+ }
+
// free token field
OICFree(info->token);
info->token = NULL;
diff --git a/resource/csdk/connectivity/inc/caretransmission.h b/resource/csdk/connectivity/inc/caretransmission.h
index a43ecd238..84c87a15c 100644
--- a/resource/csdk/connectivity/inc/caretransmission.h
+++ b/resource/csdk/connectivity/inc/caretransmission.h
@@ -41,8 +41,10 @@
/** default ACK time is 2 sec(CoAP). **/
#define DEFAULT_ACK_TIMEOUT_SEC 2
-/** default max retransmission trying count is 4(CoAP). **/
-#define DEFAULT_RETRANSMISSION_COUNT 4
+/** default max retransmission trying count is 4(CoAP).
+ * to allow reponse timeout greater than 60 seconds increased trying count to 5
+ */
+#define DEFAULT_RETRANSMISSION_COUNT 5
/** check period is 1 sec. **/
#define RETRANSMISSION_CHECK_PERIOD_SEC 1
diff --git a/resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c b/resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c
index 7b8f60e16..73831e4c8 100644
--- a/resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c
+++ b/resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c
@@ -964,9 +964,7 @@ static int VerifyCertificateCallback(void *p_vrfy, mbedtls_x509_crt *crt, int de
mbedtls_x509_crt_info(buf, sizeof(buf) - 1, "", crt);
OIC_LOG_V(DEBUG, NET_SSL_TAG, "crt : %s", buf);
- g_peerCertCallback.cb(g_peerCertCallback.ctx, crt, depth);
-
- return 0;
+ return g_peerCertCallback.cb(g_peerCertCallback.ctx, crt, depth);
}
CAResult_t CAsetPeerCertCallback(void *ctx, PeerCertCallback peerCertCallback)
diff --git a/resource/csdk/connectivity/src/bt_le_adapter/caleadapter.c b/resource/csdk/connectivity/src/bt_le_adapter/caleadapter.c
index 3176f83c7..6c9d09ed5 100755
--- a/resource/csdk/connectivity/src/bt_le_adapter/caleadapter.c
+++ b/resource/csdk/connectivity/src/bt_le_adapter/caleadapter.c
@@ -1243,7 +1243,10 @@ static void CALEServerSendDataThread(void *threadData)
{
OIC_LOG_V(ERROR, CALEADAPTER_TAG,
"CAGenerateVariableForFragmentation failed, result [%d]", result);
- g_errorHandler(bleData->remoteEndpoint, bleData->data, bleData->dataLen, result);
+ if (g_errorHandler)
+ {
+ g_errorHandler(bleData->remoteEndpoint, bleData->data, bleData->dataLen, result);
+ }
return;
}
@@ -1285,7 +1288,10 @@ static void CALEServerSendDataThread(void *threadData)
{
OIC_LOG_V(ERROR, CALEADAPTER_TAG,
"CAGenerateHeader failed, result [%d]", result);
- g_errorHandler(bleData->remoteEndpoint, bleData->data, bleData->dataLen, result);
+ if (g_errorHandler)
+ {
+ g_errorHandler(bleData->remoteEndpoint, bleData->data, bleData->dataLen, result);
+ }
return;
}
@@ -1298,7 +1304,10 @@ static void CALEServerSendDataThread(void *threadData)
{
OIC_LOG_V(ERROR, CALEADAPTER_TAG,
"CAGenerateHeaderPayloadLength failed, result [%d]", result);
- g_errorHandler(bleData->remoteEndpoint, bleData->data, bleData->dataLen, result);
+ if (g_errorHandler)
+ {
+ g_errorHandler(bleData->remoteEndpoint, bleData->data, bleData->dataLen, result);
+ }
return;
}
@@ -1323,7 +1332,10 @@ static void CALEServerSendDataThread(void *threadData)
{
OIC_LOG_V(ERROR, CALEADAPTER_TAG,
"Making data segment failed, result [%d]", result);
- g_errorHandler(bleData->remoteEndpoint, bleData->data, bleData->dataLen, result);
+ if (g_errorHandler)
+ {
+ g_errorHandler(bleData->remoteEndpoint, bleData->data, bleData->dataLen, result);
+ }
return;
}
@@ -1344,11 +1356,13 @@ static void CALEServerSendDataThread(void *threadData)
CALEADAPTER_TAG,
"Update characteristics failed, result [%d]",
result);
-
- g_errorHandler(bleData->remoteEndpoint,
- bleData->data,
- bleData->dataLen,
- result);
+ if (g_errorHandler)
+ {
+ g_errorHandler(bleData->remoteEndpoint,
+ bleData->data,
+ bleData->dataLen,
+ result);
+ }
return;
}
@@ -1367,7 +1381,10 @@ static void CALEServerSendDataThread(void *threadData)
{
OIC_LOG_V(ERROR, CALEADAPTER_TAG,
"CAGenerateHeader failed, result [%d]", result);
- g_errorHandler(bleData->remoteEndpoint, bleData->data, bleData->dataLen, result);
+ if (g_errorHandler)
+ {
+ g_errorHandler(bleData->remoteEndpoint, bleData->data, bleData->dataLen, result);
+ }
return;
}
@@ -1386,7 +1403,10 @@ static void CALEServerSendDataThread(void *threadData)
{
OIC_LOG_V(ERROR, CALEADAPTER_TAG,
"Making data segment failed, result [%d]", result);
- g_errorHandler(bleData->remoteEndpoint, bleData->data, bleData->dataLen, result);
+ if (g_errorHandler)
+ {
+ g_errorHandler(bleData->remoteEndpoint, bleData->data, bleData->dataLen, result);
+ }
return;
}
@@ -1400,7 +1420,10 @@ static void CALEServerSendDataThread(void *threadData)
{
OIC_LOG_V(ERROR, CALEADAPTER_TAG,
"Update characteristics failed, result [%d]", result);
- g_errorHandler(bleData->remoteEndpoint, bleData->data, bleData->dataLen, result);
+ if (g_errorHandler)
+ {
+ g_errorHandler(bleData->remoteEndpoint, bleData->data, bleData->dataLen, result);
+ }
return;
}
OIC_LOG_V(DEBUG, CALEADAPTER_TAG, "Server Sent data length [%d]",
@@ -1423,7 +1446,10 @@ static void CALEServerSendDataThread(void *threadData)
{
OIC_LOG_V(ERROR, CALEADAPTER_TAG,
"Making data segment failed, result [%d]", result);
- g_errorHandler(bleData->remoteEndpoint, bleData->data, bleData->dataLen, result);
+ if (g_errorHandler)
+ {
+ g_errorHandler(bleData->remoteEndpoint, bleData->data, bleData->dataLen, result);
+ }
return;
}
@@ -1438,10 +1464,13 @@ static void CALEServerSendDataThread(void *threadData)
CALEADAPTER_TAG,
"Update characteristics failed, result [%d]",
result);
- g_errorHandler(bleData->remoteEndpoint,
- bleData->data,
- bleData->dataLen,
- result);
+ if (g_errorHandler)
+ {
+ g_errorHandler(bleData->remoteEndpoint,
+ bleData->data,
+ bleData->dataLen,
+ result);
+ }
return;
}
OIC_LOG_V(DEBUG,
@@ -1490,11 +1519,13 @@ static void CALEClientSendDataThread(void *threadData)
CALEADAPTER_TAG,
"CALEClientSendNegotiationMessage has failed, result [%d]",
res);
-
- g_errorHandler(bleData->remoteEndpoint,
- bleData->data,
- bleData->dataLen,
- res);
+ if (g_errorHandler)
+ {
+ g_errorHandler(bleData->remoteEndpoint,
+ bleData->data,
+ bleData->dataLen,
+ res);
+ }
return;
}
}
@@ -1517,7 +1548,10 @@ static void CALEClientSendDataThread(void *threadData)
{
OIC_LOG_V(ERROR, CALEADAPTER_TAG,
"CAGenerateVariableForFragmentation failed, result [%d]", result);
- g_errorHandler(bleData->remoteEndpoint, bleData->data, bleData->dataLen, result);
+ if (g_errorHandler)
+ {
+ g_errorHandler(bleData->remoteEndpoint, bleData->data, bleData->dataLen, result);
+ }
return;
}
@@ -1555,7 +1589,10 @@ static void CALEClientSendDataThread(void *threadData)
{
OIC_LOG_V(ERROR, CALEADAPTER_TAG,
"CAGenerateHeader failed, result [%d]", result);
- g_errorHandler(bleData->remoteEndpoint, bleData->data, bleData->dataLen, result);
+ if (g_errorHandler)
+ {
+ g_errorHandler(bleData->remoteEndpoint, bleData->data, bleData->dataLen, result);
+ }
return;
}
@@ -1568,7 +1605,10 @@ static void CALEClientSendDataThread(void *threadData)
{
OIC_LOG_V(ERROR, CALEADAPTER_TAG,
"CAGenerateHeaderPayloadLength failed, result [%d]", result);
- g_errorHandler(bleData->remoteEndpoint, bleData->data, bleData->dataLen, result);
+ if (g_errorHandler)
+ {
+ g_errorHandler(bleData->remoteEndpoint, bleData->data, bleData->dataLen, result);
+ }
return;
}
@@ -1593,7 +1633,10 @@ static void CALEClientSendDataThread(void *threadData)
{
OIC_LOG_V(ERROR, CALEADAPTER_TAG,
"Making data segment failed, result [%d]", result);
- g_errorHandler(bleData->remoteEndpoint, bleData->data, bleData->dataLen, result);
+ if (g_errorHandler)
+ {
+ g_errorHandler(bleData->remoteEndpoint, bleData->data, bleData->dataLen, result);
+ }
return;
}
@@ -1617,10 +1660,13 @@ static void CALEClientSendDataThread(void *threadData)
CALEADAPTER_TAG,
"Update characteristics failed, result [%d]",
result);
- g_errorHandler(bleData->remoteEndpoint,
- bleData->data,
- bleData->dataLen,
- result);
+ if (g_errorHandler)
+ {
+ g_errorHandler(bleData->remoteEndpoint,
+ bleData->data,
+ bleData->dataLen,
+ result);
+ }
return;
}
OIC_LOG_V(DEBUG,
@@ -1638,7 +1684,10 @@ static void CALEClientSendDataThread(void *threadData)
{
OIC_LOG_V(ERROR, CALEADAPTER_TAG,
"CAGenerateHeader failed, result [%d]", result);
- g_errorHandler(bleData->remoteEndpoint, bleData->data, bleData->dataLen, result);
+ if (g_errorHandler)
+ {
+ g_errorHandler(bleData->remoteEndpoint, bleData->data, bleData->dataLen, result);
+ }
return;
}
@@ -1656,7 +1705,10 @@ static void CALEClientSendDataThread(void *threadData)
{
OIC_LOG_V(ERROR, CALEADAPTER_TAG,
"Making data segment failed, result [%d]", result);
- g_errorHandler(bleData->remoteEndpoint, bleData->data, bleData->dataLen, result);
+ if (g_errorHandler)
+ {
+ g_errorHandler(bleData->remoteEndpoint, bleData->data, bleData->dataLen, result);
+ }
return;
}
@@ -1673,7 +1725,10 @@ static void CALEClientSendDataThread(void *threadData)
CALEADAPTER_TAG,
"Update characteristics failed, result [%d]",
result);
- g_errorHandler(bleData->remoteEndpoint, bleData->data, bleData->dataLen, result);
+ if (g_errorHandler)
+ {
+ g_errorHandler(bleData->remoteEndpoint, bleData->data, bleData->dataLen, result);
+ }
return;
}
OIC_LOG_V(DEBUG,
@@ -1699,7 +1754,10 @@ static void CALEClientSendDataThread(void *threadData)
{
OIC_LOG_V(ERROR, CALEADAPTER_TAG,
"Making data segment failed, result [%d]", result);
- g_errorHandler(bleData->remoteEndpoint, bleData->data, bleData->dataLen, result);
+ if (g_errorHandler)
+ {
+ g_errorHandler(bleData->remoteEndpoint, bleData->data, bleData->dataLen, result);
+ }
return;
}
@@ -1713,7 +1771,10 @@ static void CALEClientSendDataThread(void *threadData)
{
OIC_LOG_V(ERROR, CALEADAPTER_TAG, "Update characteristics failed, result [%d]",
result);
- g_errorHandler(bleData->remoteEndpoint, bleData->data, bleData->dataLen, result);
+ if (g_errorHandler)
+ {
+ g_errorHandler(bleData->remoteEndpoint, bleData->data, bleData->dataLen, result);
+ }
return;
}
OIC_LOG_V(DEBUG,
diff --git a/resource/csdk/connectivity/src/cablockwisetransfer.c b/resource/csdk/connectivity/src/cablockwisetransfer.c
index 94a642b4a..10efa2e20 100644..100755
--- a/resource/csdk/connectivity/src/cablockwisetransfer.c
+++ b/resource/csdk/connectivity/src/cablockwisetransfer.c
@@ -1169,6 +1169,7 @@ CAResult_t CAUpdateBlockOptionItems(CABlockData_t *currData, const coap_pdu_t *p
{
VERIFY_NON_NULL(currData, TAG, "currData");
VERIFY_NON_NULL(pdu, TAG, "pdu");
+ VERIFY_NON_NULL(pdu->transport_hdr, TAG, "pdu->transport_hdr");
VERIFY_NON_NULL(block, TAG, "block");
// update block data
diff --git a/resource/csdk/connectivity/src/camessagehandler.c b/resource/csdk/connectivity/src/camessagehandler.c
index dcc172efd..bb9d829cc 100755
--- a/resource/csdk/connectivity/src/camessagehandler.c
+++ b/resource/csdk/connectivity/src/camessagehandler.c
@@ -1300,10 +1300,13 @@ void CAClearMessageHandler(CATransportAdapter_t transportType)
OIC_LOG_V(ERROR, TAG, "Clear send data failed[%d]", res);
}
- res = CARetransmissionClearAdapterData(&g_retransmissionContext, transportType);
- if (res != CA_STATUS_OK)
+ if (transportType & DEFAULT_RETRANSMISSION_TYPE)
{
- OIC_LOG_V(ERROR, TAG, "Clear retransmission data failed[%d]", res);
+ res = CARetransmissionClearAdapterData(&g_retransmissionContext, transportType);
+ if (res != CA_STATUS_OK)
+ {
+ OIC_LOG_V(ERROR, TAG, "Clear retransmission data failed[%d]", res);
+ }
}
}
diff --git a/resource/csdk/connectivity/src/caretransmission.c b/resource/csdk/connectivity/src/caretransmission.c
index 611ee5d4e..da27bb43a 100644
--- a/resource/csdk/connectivity/src/caretransmission.c
+++ b/resource/csdk/connectivity/src/caretransmission.c
@@ -654,11 +654,19 @@ CAResult_t CARetransmissionClearAdapterData(CARetransmission_t *context, CATrans
// free
if (NULL != removedData && NULL != removedData->endpoint &&
- removedData->endpoint->adapter == type)
+ (removedData->endpoint->adapter == type))
{
- CAFreeEndpoint(removedData->endpoint);
- OICFree(removedData->pdu);
- OICFree(removedData);
+ CARetransmissionData_t *remData = (CARetransmissionData_t *) u_arraylist_remove(
+ context->dataList, i);
+ if (NULL == remData)
+ {
+ continue;
+ }
+ CAFreeEndpoint(remData->endpoint);
+ OICFree(remData->pdu);
+ OICFree(remData);
+ len = u_arraylist_length(context->dataList);
+ i--;
}
}