summaryrefslogtreecommitdiff
path: root/src/input/input_net.c
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2011-10-04 23:41:41 +0100
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2011-10-04 23:41:41 +0100
commit5be586e3025e72c1a1cef2a3ada6238486f7ed43 (patch)
tree2a5da19b632e9296e622e47c161062caec0b9b89 /src/input/input_net.c
parentd7c4d2bd622b1405ff520006dbeaf739e9725a89 (diff)
parent7e335173083e1fc91f27927a2d749f5a09773b32 (diff)
downloadxine-lib-5be586e3025e72c1a1cef2a3ada6238486f7ed43.tar.gz
xine-lib-5be586e3025e72c1a1cef2a3ada6238486f7ed43.tar.bz2
Merge from 1.1.
--HG-- rename : src/xine-utils/attributes.h => include/xine/attributes.h rename : src/xine-engine/xine_internal.h => include/xine/xine_internal.h rename : src/xine-utils/xineutils.h => include/xine/xineutils.h
Diffstat (limited to 'src/input/input_net.c')
-rw-r--r--src/input/input_net.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/input/input_net.c b/src/input/input_net.c
index 5007b58a3..cd4a8c901 100644
--- a/src/input/input_net.c
+++ b/src/input/input_net.c
@@ -115,7 +115,7 @@ static int host_connect_attempt_ipv4(struct in_addr ia, int port, xine_t *xine)
int s;
struct sockaddr_in sin;
- s = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
+ s = xine_socket_cloexec(PF_INET, SOCK_STREAM, IPPROTO_TCP);
if (s==-1) {
xine_log(xine, XINE_LOG_MSG,
_("input_net: socket(): %s\n"), strerror(errno));
@@ -143,10 +143,9 @@ static int host_connect_attempt_ipv4(struct in_addr ia, int port, xine_t *xine)
#else
static int host_connect_attempt(int family, struct sockaddr* sin, int addrlen, xine_t *xine) {
- int s;
+ int s = xine_socket_cloexec(family, SOCK_STREAM, IPPROTO_TCP);
- s = socket(family, SOCK_STREAM, IPPROTO_TCP);
- if (s==-1) {
+ if (s == -1) {
xine_log(xine, XINE_LOG_MSG,
_("input_net: socket(): %s\n"), strerror(errno));
return -1;