event/SocketMonitor: use class SocketDescriptor

This commit is contained in:
Max Kellermann
2017-08-10 18:25:22 +02:00
parent fcfc8bacc0
commit 492b20a89d
21 changed files with 80 additions and 83 deletions

View File

@@ -118,7 +118,7 @@ HttpdOutput::Unbind()
* HttpdOutput.clients linked list.
*/
inline void
HttpdOutput::AddClient(int fd)
HttpdOutput::AddClient(SocketDescriptor fd)
{
auto *client = new HttpdClient(*this, fd, GetEventLoop(),
!encoder->ImplementsTag());
@@ -184,7 +184,7 @@ HttpdOutput::OnAccept(int fd, SocketAddress address, gcc_unused int uid)
/* can we allow additional client */
if (open && (clients_max == 0 || clients.size() < clients_max))
AddClient(fd);
AddClient(SocketDescriptor(fd));
else
close_socket(fd);
}