OSDN Git Service

Avoid more annoying crashing
[android-x86/system-bt.git] / service / daemon.cpp
index 9429f40..0439c36 100644 (file)
@@ -90,7 +90,7 @@ class DaemonImpl : public Daemon {
     // If an IPC socket path was given, initialize IPC with it. Otherwise
     // initialize Binder IPC.
     if (settings_->UseSocketIPC()) {
-      if (!ipc_manager_->Start(ipc::IPCManager::TYPE_UNIX, nullptr)) {
+      if (!ipc_manager_->Start(ipc::IPCManager::TYPE_LINUX, nullptr)) {
         LOG(ERROR) << "Failed to set up UNIX domain-socket IPCManager";
         return false;
       }
@@ -117,7 +117,7 @@ class DaemonImpl : public Daemon {
       return false;
     }
 
-    adapter_.reset(new Adapter());
+    adapter_ = Adapter::Create();
     ipc_manager_.reset(new ipc::IPCManager(adapter_.get()));
 
     if (!SetUpIPC()) {