diff options
Diffstat (limited to 'source4/lib/socket/socket.c')
-rw-r--r-- | source4/lib/socket/socket.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/source4/lib/socket/socket.c b/source4/lib/socket/socket.c index a60171ccd1..92f0a44005 100644 --- a/source4/lib/socket/socket.c +++ b/source4/lib/socket/socket.c @@ -23,6 +23,7 @@ #include "lib/socket/socket.h" #include "system/filesys.h" #include "system/network.h" +#include "param/param.h" /* auto-close sockets on free @@ -69,14 +70,14 @@ _PUBLIC_ NTSTATUS socket_create_with_ops(TALLOC_CTX *mem_ctx, const struct socke if (!(flags & SOCKET_FLAG_BLOCK) && type == SOCKET_TYPE_STREAM && - lp_parm_bool(-1, "socket", "testnonblock", False)) { + lp_parm_bool(global_loadparm, NULL, "socket", "testnonblock", false)) { (*new_sock)->flags |= SOCKET_FLAG_TESTNONBLOCK; } /* we don't do a connect() on dgram sockets, so need to set non-blocking at socket create time */ if (!(flags & SOCKET_FLAG_BLOCK) && type == SOCKET_TYPE_DGRAM) { - set_blocking(socket_get_fd(*new_sock), False); + set_blocking(socket_get_fd(*new_sock), false); } talloc_set_destructor(*new_sock, socket_destructor); @@ -407,7 +408,7 @@ _PUBLIC_ struct socket_address *socket_address_from_sockaddr(TALLOC_CTX *mem_ctx addr->family = NULL; addr->addr = NULL; addr->port = 0; - addr->sockaddr = talloc_memdup(addr, sockaddr, sockaddrlen); + addr->sockaddr = (struct sockaddr *)talloc_memdup(addr, sockaddr, sockaddrlen); if (!addr->sockaddr) { talloc_free(addr); return NULL; @@ -429,10 +430,6 @@ _PUBLIC_ const struct socket_ops *socket_getops_byname(const char *family, enum #if HAVE_IPV6 if (strcmp("ipv6", family) == 0) { - if (lp_parm_bool(-1, "socket", "noipv6", False)) { - DEBUG(3, ("IPv6 support was disabled in smb.conf")); - return NULL; - } return socket_ipv6_ops(type); } #endif @@ -505,12 +502,12 @@ _PUBLIC_ void set_socket_options(int fd, const char *options) int ret=0,i; int value = 1; char *p; - BOOL got_value = False; + bool got_value = false; if ((p = strchr(tok,'='))) { *p = 0; value = atoi(p+1); - got_value = True; + got_value = true; } for (i=0;socket_options[i].name;i++) |