summaryrefslogtreecommitdiff
path: root/source3/lib/util_sock.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/util_sock.c')
-rw-r--r--source3/lib/util_sock.c12
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;