aboutsummaryrefslogtreecommitdiffstats
path: root/src/output/httpd_output_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-09-19 21:04:19 +0200
committerMax Kellermann <max@duempel.org>2011-09-20 08:38:58 +0200
commitc476819cb1186770b1b7395851e394caac39cbc8 (patch)
tree7e2d236e71ac88238026bb8803bfa87121c00f1d /src/output/httpd_output_plugin.c
parent77a56c7c5a1ab6bc0d76e0cf55f24071be7c4b5f (diff)
downloadmpd-c476819cb1186770b1b7395851e394caac39cbc8.tar.gz
mpd-c476819cb1186770b1b7395851e394caac39cbc8.tar.xz
mpd-c476819cb1186770b1b7395851e394caac39cbc8.zip
fd_util: add function close_socket()
Wrap close(), use closesocket() on WIN32/WinSock.
Diffstat (limited to 'src/output/httpd_output_plugin.c')
-rw-r--r--src/output/httpd_output_plugin.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/output/httpd_output_plugin.c b/src/output/httpd_output_plugin.c
index 40ad05c3d..2c140a300 100644
--- a/src/output/httpd_output_plugin.c
+++ b/src/output/httpd_output_plugin.c
@@ -201,7 +201,7 @@ httpd_listen_in_event(int fd, const struct sockaddr *address,
g_warning("libwrap refused connection (libwrap=%s) from %s",
progname, hostaddr);
g_free(hostaddr);
- close(fd);
+ close_socket(fd);
g_mutex_unlock(httpd->mutex);
return;
}
@@ -222,7 +222,7 @@ httpd_listen_in_event(int fd, const struct sockaddr *address,
httpd->clients_cnt < httpd->clients_max))
httpd_client_add(httpd, fd);
else
- close(fd);
+ close_socket(fd);
} else if (fd < 0 && errno != EINTR) {
g_warning("accept() failed: %s", g_strerror(errno));
}