wrap CAcloseSslConnectionFreeEndpoint method with __TIZEN__ flag 56/201656/1
authorGrzegorz Żakiewicz <g.zakiewicz@samsung.com>
Tue, 12 Mar 2019 15:47:05 +0000 (16:47 +0100)
committerAbhishek Sansanwal <abhishek.s94@samsung.com>
Mon, 18 Mar 2019 10:11:05 +0000 (06:11 -0400)
[Model] IoTivity
[BinType] AP
[Customer] iot-core

[Issue#] CONPRO-1392
[Request] r.chudek
[Occurrence Version] n/a

[Problem] pthread might be not available on other platforms
[Cause & Measure] n/a
[Checking Method] n/a

[Team] IoTConnection
[Developer] g.zakiewicz
[Solution company] Samsung
[Change Type] fix

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/414
(cherry picked from 9dc9af2eabffb1d46c1671baa4b0decfeb173a1e)

Change-Id: Idac05cde4018b6b064721c2ada5706601c2cb0c3
Signed-off-by: Abhishek Sansanwal <abhishek.s94@samsung.com>
resource/csdk/connectivity/api/casecurityinterface.h
resource/csdk/connectivity/inc/ca_adapter_net_ssl.h
resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c
resource/csdk/connectivity/src/bt_le_adapter/caleadapter.c

index 117ab18..5e628d4 100644 (file)
@@ -323,6 +323,7 @@ CAResult_t CAinitiateSslHandshake(const CAEndpoint_t *endpoint);
  */
 CAResult_t CAcloseSslConnection(const CAEndpoint_t *endpoint);
 
+#ifdef __TIZEN__
 /**
  * Close the DTLS session and free endpoint.
  *
@@ -333,6 +334,7 @@ CAResult_t CAcloseSslConnection(const CAEndpoint_t *endpoint);
  * @retval  ::CA_STATUS_FAILED Operation failed.
  */
 CAResult_t CAcloseSslConnectionFreeEndpoint(CAEndpoint_t *endpoint);
+#endif //__TIZEN__
 
 /**
  * Close the TLS session using UUID
index 4dd2510..1bfdecc 100644 (file)
@@ -89,6 +89,7 @@ void CAsetSslCredentialsCallback(CAgetPskCredentialsHandler credCallback);
  */
 CAResult_t CAcloseSslConnection(const CAEndpoint_t *endpoint);
 
+#ifdef __TIZEN__
 /**
  * Close the DTLS session and free endpoint.
  *
@@ -99,6 +100,7 @@ CAResult_t CAcloseSslConnection(const CAEndpoint_t *endpoint);
  * @retval  ::CA_STATUS_FAILED Operation failed.
  */
 CAResult_t CAcloseSslConnectionFreeEndpoint(CAEndpoint_t *endpoint);
+#endif //__TIZEN__
 
 /**
  * initialize mbedTLS library and other necessary initialization.
index 2553e5b..c3c3580 100644 (file)
@@ -1505,6 +1505,7 @@ CAResult_t CAcloseSslConnection(const CAEndpoint_t *endpoint)
     return CA_STATUS_OK;
 }
 
+#ifdef __TIZEN__
 CAResult_t CAcloseSslConnectionFreeEndpoint(CAEndpoint_t *endpoint)
 {
     OIC_LOG_V(INFO, NET_SSL_TAG, "In %s", __func__);
@@ -1516,7 +1517,7 @@ CAResult_t CAcloseSslConnectionFreeEndpoint(CAEndpoint_t *endpoint)
     OIC_LOG_V(INFO, NET_SSL_TAG, "Out %s", __func__);
     return ret;
 }
-
+#endif //__TIZEN__
 
 CAResult_t CAcloseSslConnectionUsingUuid(const uint8_t *identity, size_t idLength)
 {
index 93c8bde..01c80b2 100644 (file)
@@ -3194,7 +3194,7 @@ static void CALEConnectionStateChangedCb(CATransportAdapter_t adapter, const cha
 #endif
 
 #ifdef __WITH_DTLS__
-#ifndef SINGLE_THREAD
+#if defined(__TIZEN__) && !defined(SINGLE_THREAD)
         // CAcloseSslConnection returns CAResult_t instead of void*, but the size is the same and crash shouldn't occur
         pthread_t ccThread;
         pthread_attr_t attr;