From 9265cb02d00843f43ba07d28093f959adf0738fe Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 2 Nov 2008 01:15:42 +0100 Subject: Use a separate global for nonblocking socket testing rather than global_loadparm. --- source4/lib/socket/socket.c | 4 +++- source4/lib/socket/socket.h | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'source4/lib') diff --git a/source4/lib/socket/socket.c b/source4/lib/socket/socket.c index 0c3d032068..3be841311a 100644 --- a/source4/lib/socket/socket.c +++ b/source4/lib/socket/socket.c @@ -25,6 +25,8 @@ #include "system/network.h" #include "param/param.h" +bool testnonblock = false; + /* auto-close sockets on free */ @@ -70,7 +72,7 @@ _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(global_loadparm, NULL, "socket", "testnonblock", false)) { + testnonblock) { (*new_sock)->flags |= SOCKET_FLAG_TESTNONBLOCK; } diff --git a/source4/lib/socket/socket.h b/source4/lib/socket/socket.h index 4baa0cfbb1..ec3afe8f7f 100644 --- a/source4/lib/socket/socket.h +++ b/source4/lib/socket/socket.h @@ -208,4 +208,6 @@ NTSTATUS socket_connect_multi(TALLOC_CTX *mem_ctx, const char *server_address, void set_socket_options(int fd, const char *options); void socket_set_flags(struct socket_context *socket, unsigned flags); +extern bool testnonblock; + #endif /* _SAMBA_SOCKET_H */ -- cgit