mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:58:11 +00:00
Kernel: Remove ioctl for getting a socket peer's PID.
Now that everything is nice and mature, the WindowServer can just use the client PID it receives in the Greeting message, and we can get rid of this hacky ioctl. :^)
This commit is contained in:
parent
bc1da7f1fd
commit
367bb9e4eb
4 changed files with 6 additions and 19 deletions
|
@ -40,9 +40,6 @@ WSClientConnection::WSClientConnection(int fd)
|
|||
static int s_next_client_id = 0;
|
||||
m_client_id = ++s_next_client_id;
|
||||
|
||||
int rc = ioctl(m_fd, 413, (int)&m_pid);
|
||||
ASSERT(rc == 0);
|
||||
|
||||
if (!s_connections)
|
||||
s_connections = new HashMap<int, WSClientConnection*>;
|
||||
s_connections->set(m_client_id, this);
|
||||
|
@ -86,13 +83,6 @@ void WSClientConnection::post_message(const WSAPI_ServerMessage& message)
|
|||
ASSERT(nwritten == sizeof(message));
|
||||
}
|
||||
|
||||
RetainPtr<GraphicsBitmap> WSClientConnection::create_shared_bitmap(GraphicsBitmap::Format format, const Size& size)
|
||||
{
|
||||
auto shared_buffer = SharedBuffer::create(m_pid, size.area() * sizeof(RGBA32));
|
||||
ASSERT(shared_buffer);
|
||||
return GraphicsBitmap::create_with_shared_buffer(format, *shared_buffer, size);
|
||||
}
|
||||
|
||||
void WSClientConnection::on_message(WSMessage& message)
|
||||
{
|
||||
if (message.is_client_request()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue