libpurple/protocols/bonjour/jabber.c

branch
soc.2013.gobjectification.plugins
changeset 37145
8826f95514fd
parent 37144
8b63b9948107
parent 36031
9eb8f52893d0
child 37148
50f361d39a1e
--- a/libpurple/protocols/bonjour/jabber.c	Sat May 10 03:56:36 2014 +0530
+++ b/libpurple/protocols/bonjour/jabber.c	Thu May 15 10:16:32 2014 +0530
@@ -637,7 +637,6 @@
 	common_sockaddr_t their_addr; /* connector's address information */
 	socklen_t sin_size = sizeof(common_sockaddr_t);
 	int client_socket;
-	int flags;
 #ifdef HAVE_INET_NTOP
 	char addrstr[INET6_ADDRSTRLEN];
 #endif
@@ -654,13 +653,7 @@
 
 	if ((client_socket = accept(server_socket, &their_addr.sa, &sin_size)) == -1)
 		return;
-
-	flags = fcntl(client_socket, F_GETFL);
-	fcntl(client_socket, F_SETFL, flags | O_NONBLOCK);
-#ifndef _WIN32
-	if (fcntl(client_socket, F_SETFD, FD_CLOEXEC) != 0)
-		purple_debug_warning("bonjour", "jabber: couldn't set FD_CLOEXEC\n");
-#endif
+	_purple_network_set_common_socket_flags(client_socket);
 
 	/* Look for the buddy that has opened the conversation and fill information */
 #ifdef HAVE_INET_NTOP

mercurial