replace : iotivity -> iotivity-sec
[platform/upstream/iotivity.git] / resource / csdk / connectivity / src / bt_edr_adapter / tizen / caedrserver.c
index b2a5371..f527f1d 100644 (file)
@@ -31,7 +31,7 @@
 #include "caadapterutils.h"
 #include "caedrutils.h"
 #include "logger.h"
-#include "camutex.h"
+#include "octhread.h"
 #include "cacommon.h"
 #include "caedrdevicelist.h"
 
@@ -42,10 +42,16 @@ static int32_t g_maxPendingConnections = 10;
  */
 static int g_serverFD = -1;
 
-CAResult_t CAEDRServerStart(ca_thread_pool_t handle)
+CAResult_t CAEDRServerStart()
 {
     OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
+    if(-1 != g_serverFD)
+    {
+        OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "%s Already running", __func__);
+        return CA_STATUS_OK;
+    }
+
     bool isRunning = false;
     bt_error_e err = bt_adapter_is_service_used(OIC_EDR_SERVICE_ID, &isRunning);
     if (BT_ERROR_NONE != err)
@@ -106,6 +112,12 @@ CAResult_t CAEDRServerStop()
     return CA_STATUS_OK;
 }
 
+CAResult_t CAEDRServerInitialize(ca_thread_pool_t handle)
+{
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "CAEDRServerInitialize");
+    return CA_STATUS_OK;
+}
+
 void CAEDRServerTerminate()
 {
     // This is just a dummy