diff options
author | Volker Lendecke <vl@samba.org> | 2009-01-03 18:16:08 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2009-01-03 19:22:06 +0100 |
commit | fafb9ecc613914ee49bfdb4c1eb249fcbbcf25f7 (patch) | |
tree | 46fb8c81e7fb5b715f0405a08e688677af6d0479 /source3/lib | |
parent | b6138bf4f22e7a093d35e2f23992595acae55068 (diff) | |
download | samba-fafb9ecc613914ee49bfdb4c1eb249fcbbcf25f7.tar.gz samba-fafb9ecc613914ee49bfdb4c1eb249fcbbcf25f7.tar.bz2 samba-fafb9ecc613914ee49bfdb4c1eb249fcbbcf25f7.zip |
open_socket_out is always used with SOCK_STREAM, remove argument "type"
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/util_sock.c | 12 |
1 files changed, 3 insertions, 9 deletions
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; |