diff options
author | Max Kellermann <max@duempel.org> | 2015-02-10 20:30:10 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2015-02-10 22:06:06 +0100 |
commit | 4e30e747390ac6bb6a6e5ededfbcdae937579393 (patch) | |
tree | beb2d9acd687a62d476e796114efd8ea6b2f69ad /src/client/ClientNew.cxx | |
parent | 42890b9acf50c4406b61b3b37078c00ec79411fa (diff) | |
download | mpd-4e30e747390ac6bb6a6e5ededfbcdae937579393.tar.gz mpd-4e30e747390ac6bb6a6e5ededfbcdae937579393.tar.xz mpd-4e30e747390ac6bb6a6e5ededfbcdae937579393.zip |
net/SocketAddress: light wrapper for struct sockaddr
Diffstat (limited to 'src/client/ClientNew.cxx')
-rw-r--r-- | src/client/ClientNew.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/client/ClientNew.cxx b/src/client/ClientNew.cxx index 2b6941fd0..8dca9f81f 100644 --- a/src/client/ClientNew.cxx +++ b/src/client/ClientNew.cxx @@ -23,6 +23,7 @@ #include "Partition.hxx" #include "Instance.hxx" #include "system/fd_util.h" +#include "net/SocketAddress.hxx" #include "net/Resolver.hxx" #include "Permission.hxx" #include "util/Error.hxx" @@ -58,15 +59,15 @@ Client::Client(EventLoop &_loop, Partition &_partition, void client_new(EventLoop &loop, Partition &partition, - int fd, const struct sockaddr *sa, size_t sa_length, int uid) + int fd, SocketAddress address, int uid) { static unsigned int next_client_num; - const auto remote = sockaddr_to_string(sa, sa_length); + const auto remote = sockaddr_to_string(address); assert(fd >= 0); #ifdef HAVE_LIBWRAP - if (sa->sa_family != AF_UNIX) { + if (address.GetFamily() != AF_UNIX) { // TODO: shall we obtain the program name from argv[0]? const char *progname = "mpd"; |