aboutsummaryrefslogtreecommitdiffstats
path: root/src/listen.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-11-08 22:11:35 +0100
committerMax Kellermann <max@duempel.org>2009-11-08 22:11:35 +0100
commitf66edccffdc4a9276ae9dced69fa6fb74ee1f97e (patch)
tree3350b0852762cb393c12054e28c999532b4fd027 /src/listen.c
parentb043ade456818a414c726c8525bb8ec63658edc8 (diff)
downloadmpd-f66edccffdc4a9276ae9dced69fa6fb74ee1f97e.tar.gz
mpd-f66edccffdc4a9276ae9dced69fa6fb74ee1f97e.tar.xz
mpd-f66edccffdc4a9276ae9dced69fa6fb74ee1f97e.zip
fd_util: added O_NONBLOCK functions
Changed the wrappers for pipe(), socket(), accept(). On WIN32, this does not work for pipe().
Diffstat (limited to 'src/listen.c')
-rw-r--r--src/listen.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/listen.c b/src/listen.c
index 2490780ad..668a8077c 100644
--- a/src/listen.c
+++ b/src/listen.c
@@ -21,7 +21,6 @@
#include "socket_util.h"
#include "client.h"
#include "conf.h"
-#include "utils.h"
#include "fd_util.h"
#include "config.h"
@@ -429,10 +428,9 @@ listen_in_event(G_GNUC_UNUSED GIOChannel *source,
struct sockaddr_storage sa;
size_t sa_length = sizeof(sa);
- fd = accept_cloexec(listen_fd, (struct sockaddr*)&sa, &sa_length);
+ fd = accept_cloexec_nonblock(listen_fd, (struct sockaddr*)&sa,
+ &sa_length);
if (fd >= 0) {
- set_nonblocking(fd);
-
client_new(fd, (struct sockaddr*)&sa, sa_length,
get_remote_uid(fd));
} else if (fd < 0 && errno != EINTR) {