From fafb9ecc613914ee49bfdb4c1eb249fcbbcf25f7 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 3 Jan 2009 18:16:08 +0100 Subject: open_socket_out is always used with SOCK_STREAM, remove argument "type" --- source3/lib/util_sock.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'source3/lib') diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c index d23758ad6a..a8c3b3031d 100644 --- a/source3/lib/util_sock.c +++ b/source3/lib/util_sock.c @@ -952,10 +952,8 @@ int open_socket_in(int type, Create an outgoing socket. timeout is in milliseconds. **************************************************************************/ -int open_socket_out(int type, - const struct sockaddr_storage *pss, - uint16_t port, - int timeout) +int open_socket_out(const struct sockaddr_storage *pss, uint16_t port, + int timeout) { char addr[INET6_ADDRSTRLEN]; struct sockaddr_storage sock_out = *pss; @@ -964,16 +962,12 @@ int open_socket_out(int type, int increment = 10; /* create a socket to write to */ - res = socket(pss->ss_family, type, 0); + res = socket(pss->ss_family, SOCK_STREAM, 0); if (res == -1) { DEBUG(0,("socket error (%s)\n", strerror(errno))); return -1; } - if (type != SOCK_STREAM) { - return res; - } - #if defined(HAVE_IPV6) if (pss->ss_family == AF_INET6) { struct sockaddr_in6 *psa6 = (struct sockaddr_in6 *)&sock_out; -- cgit