LookupServer: Port to socket takeover

This commit is contained in:
Sergey Bugaev 2019-11-26 19:39:47 +03:00 committed by Andreas Kling
parent 821ed8367b
commit ab98969403
Notes: sideshowbarker 2024-07-19 11:03:32 +09:00
3 changed files with 3 additions and 2 deletions

View file

@ -11,6 +11,7 @@ KeepAlive=1
User=anon
[LookupServer]
Socket=/tmp/portal/lookup
Priority=low
KeepAlive=1
User=anon

View file

@ -30,7 +30,7 @@ static int connect_to_lookup_server()
sockaddr_un address;
address.sun_family = AF_LOCAL;
strcpy(address.sun_path, "/tmp/.LookupServer-socket");
strcpy(address.sun_path, "/tmp/portal/lookup");
int retries = 3;
int rc = 0;

View file

@ -49,7 +49,7 @@ LookupServer::LookupServer()
const_cast<CLocalSocket&>(*socket).on_ready_to_read = []{};
};
};
bool ok = m_local_server->listen("/tmp/.LookupServer-socket");
bool ok = m_local_server->take_over_from_system_server();
ASSERT(ok);
}