Skip to content

Commit

Permalink
AudioServer: Port to socket takeover
Browse files Browse the repository at this point in the history
  • Loading branch information
bugaevc authored and awesomekling committed Nov 26, 2019
1 parent 22a0562 commit bd55938
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions Base/etc/SystemServer.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ KeepAlive=1
User=anon

[AudioServer]
Socket=/tmp/portal/audio
Priority=high
KeepAlive=1
User=anon
Expand Down
2 changes: 1 addition & 1 deletion Libraries/LibAudio/AClientConnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <SharedBuffer.h>

AClientConnection::AClientConnection()
: ConnectionNG(*this, "/tmp/asportal")
: ConnectionNG(*this, "/tmp/portal/audio")
{
}

Expand Down
4 changes: 2 additions & 2 deletions Servers/AudioServer/ASEventLoop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
ASEventLoop::ASEventLoop()
: m_server(CLocalServer::construct())
{
unlink("/tmp/asportal");
m_server->listen("/tmp/asportal");
bool ok = m_server->take_over_from_system_server();
ASSERT(ok);
m_server->on_ready_to_accept = [this] {
auto client_socket = m_server->accept();
if (!client_socket) {
Expand Down

0 comments on commit bd55938

Please sign in to comment.