diff options
author | Max Kellermann <max@duempel.org> | 2011-09-20 08:47:06 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2011-09-20 08:47:06 +0200 |
commit | 921553d7bb38345ba99c069fa1ee7816d5130c9b (patch) | |
tree | 879a0384b9a4bc93e9b3c3c476812c660b7e63b4 /src/server_socket.c | |
parent | 27946a981ff4192f064feb3117567463c137933f (diff) | |
parent | c476819cb1186770b1b7395851e394caac39cbc8 (diff) | |
download | mpd-921553d7bb38345ba99c069fa1ee7816d5130c9b.tar.gz mpd-921553d7bb38345ba99c069fa1ee7816d5130c9b.tar.xz mpd-921553d7bb38345ba99c069fa1ee7816d5130c9b.zip |
Merge branch 'v0.16.x'
Diffstat (limited to 'src/server_socket.c')
-rw-r--r-- | src/server_socket.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/server_socket.c b/src/server_socket.c index fc8dbd17a..4affeb91b 100644 --- a/src/server_socket.c +++ b/src/server_socket.c @@ -27,6 +27,7 @@ #include "socket_util.h" #include "fd_util.h" #include "glib_compat.h" +#include "glib_socket.h" #include <sys/types.h> #include <sys/stat.h> @@ -227,7 +228,7 @@ server_socket_open(struct server_socket *ss, GError **error_r) /* register in the GLib main loop */ - GIOChannel *channel = g_io_channel_unix_new(s->fd); + GIOChannel *channel = g_io_channel_new_socket(s->fd); s->source_id = g_io_add_watch(channel, G_IO_IN, server_socket_in_event, s); g_io_channel_unref(channel); @@ -261,7 +262,7 @@ server_socket_close(struct server_socket *ss) continue; g_source_remove(s->source_id); - close(s->fd); + close_socket(s->fd); s->fd = -1; } } |