summaryrefslogtreecommitdiff
path: root/source4/param
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-11-02 17:21:46 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-11-02 17:21:46 +0100
commit28d374ec159b9af405a9ef128e8439ac42245a82 (patch)
treeeda4d473c30f3e258c199e0a2cad07559e172cdd /source4/param
parent62c57cb4006ca8678ac5a94cdd1d31af3f9f0a21 (diff)
downloadsamba-28d374ec159b9af405a9ef128e8439ac42245a82.tar.gz
samba-28d374ec159b9af405a9ef128e8439ac42245a82.tar.bz2
samba-28d374ec159b9af405a9ef128e8439ac42245a82.zip
Use environment variable rather than loadparm parameter when testing
nonblocking sockets.
Diffstat (limited to 'source4/param')
-rw-r--r--source4/param/loadparm.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c
index b79be28ac0..79132a388a 100644
--- a/source4/param/loadparm.c
+++ b/source4/param/loadparm.c
@@ -2482,6 +2482,14 @@ bool lp_load(struct loadparm_context *lp_ctx, const char *filename)
ntstatus_check_dos_mapping = lp_nt_status_support(lp_ctx);
+ /* FIXME: This is a bit of a hack, but we can't use a global, since
+ * not everything that uses lp also uses the socket library */
+ if (lp_parm_bool(lp_ctx, NULL, "socket", "testnonblock", false)) {
+ setenv("SOCKET_TESTNONBLOCK", "1", 1);
+ } else {
+ unsetenv("SOCKET_TESTNONBLOCK");
+ }
+
/* FIXME: Check locale in environment for this: */
if (strcmp(lp_display_charset(lp_ctx), lp_unix_charset(lp_ctx)) != 0)
d_set_iconv(smb_iconv_open(lp_display_charset(lp_ctx), lp_unix_charset(lp_ctx)));