Replace glib threadpool usage with a 'dumb' thread implementation.
[platform/upstream/iotivity.git] / resource / csdk / connectivity / src / wifi_adapter / linux / cawifiserver.c
index a93fb5d..167c561 100644 (file)
@@ -154,9 +154,9 @@ static bool g_stopSecureUnicast = false;
 
 /**
  * @var g_threadPool
- * @brief ThreadPool for storing u_thread_pool_t handle passed from adapter
+ * @brief ThreadPool for storing ca_thread_pool_t handle passed from adapter
  */
-static u_thread_pool_t g_threadPool = NULL;
+static ca_thread_pool_t g_threadPool = NULL;
 
 /**
  * @var g_multicastServerInterface
@@ -536,7 +536,7 @@ static CAResult_t CAStartUnicastServer(const char *localAddress, uint16_t *port,
     ctx->stopFd = pipefd[PIPE_READ_FD]; // The read end of the pipe
     ctx->socket_fd = *serverFD;
     ctx->type = isSecured ? CA_SECURED_UNICAST_SERVER : CA_UNICAST_SERVER;
-    if (CA_STATUS_OK != u_thread_pool_add_task(g_threadPool, CAReceiveHandler, (void *) ctx))
+    if (CA_STATUS_OK != ca_thread_pool_add_task(g_threadPool, CAReceiveHandler, (void *) ctx))
     {
         OIC_LOG(ERROR, WIFI_SERVER_TAG, "Failed to create read thread!");
 
@@ -616,7 +616,7 @@ static CAResult_t CAWiFiServerCreateMutex(void)
     return CA_STATUS_OK;
 }
 
-CAResult_t CAWiFiInitializeServer(const u_thread_pool_t threadPool)
+CAResult_t CAWiFiInitializeServer(const ca_thread_pool_t threadPool)
 {
     OIC_LOG(DEBUG, WIFI_SERVER_TAG, "IN");
 
@@ -810,7 +810,7 @@ CAResult_t CAWiFiStartMulticastServer(const char *localAddress, const char *mult
     ctx->type = CA_MULTICAST_SERVER;
 
     g_stopMulticast = false;
-    if (CA_STATUS_OK != u_thread_pool_add_task(g_threadPool, CAReceiveHandler, (void *) ctx))
+    if (CA_STATUS_OK != ca_thread_pool_add_task(g_threadPool, CAReceiveHandler, (void *) ctx))
     {
         OIC_LOG(ERROR, WIFI_SERVER_TAG, "thread_pool_add_task failed!");