Use environment variable rather than loadparm parameter when testing
[ira/wip.git] / source4 / lib / socket / socket.c
index 3be841311afe6bbe1ea441af840aed9c8c16b70b..26cdac99a3dfe7bd48dab5b2ecece75f8f774ffa 100644 (file)
@@ -25,8 +25,6 @@
 #include "system/network.h"
 #include "param/param.h"
 
-bool testnonblock = false;
-
 /*
   auto-close sockets on free
 */
@@ -72,7 +70,7 @@ _PUBLIC_ NTSTATUS socket_create_with_ops(TALLOC_CTX *mem_ctx, const struct socke
 
        if (!(flags & SOCKET_FLAG_BLOCK) &&
            type == SOCKET_TYPE_STREAM &&
-           testnonblock) {
+               getenv("SOCKET_TESTNONBLOCK") != NULL) {
                (*new_sock)->flags |= SOCKET_FLAG_TESTNONBLOCK;
        }