From 990d76f7cbd4339c30f650781c40463234fc47e1 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 28 Oct 2004 07:55:33 +0000 Subject: r3314: added a option "socket:testnonblock" to the generic socket code. If you set this option (either on the command line using --option or in smb.conf) then every socket recv or send will return short by random amounts. This allows you to test that the non-blocking socket logic in your code works correctly. I also removed the flags argument to socket_accept(), and instead made the new socket inherit the flags of the old socket, which makes more sense to me. (This used to be commit 406d356e698da01c84e8aa5b7894752b4403f63c) --- source4/smbd/process_single.c | 2 +- source4/smbd/process_standard.c | 2 +- source4/smbd/process_thread.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'source4/smbd') diff --git a/source4/smbd/process_single.c b/source4/smbd/process_single.c index b96a1d0b2c..603726e22d 100644 --- a/source4/smbd/process_single.c +++ b/source4/smbd/process_single.c @@ -42,7 +42,7 @@ static void single_accept_connection(struct event_context *ev, struct fd_event * struct server_connection *conn; /* accept an incoming connection. */ - status = socket_accept(server_socket->socket, &sock, 0); + status = socket_accept(server_socket->socket, &sock); if (!NT_STATUS_IS_OK(status)) { DEBUG(0,("accept_connection_single: accept: %s\n", nt_errstr(status))); diff --git a/source4/smbd/process_standard.c b/source4/smbd/process_standard.c index 98810af028..106be77925 100644 --- a/source4/smbd/process_standard.c +++ b/source4/smbd/process_standard.c @@ -43,7 +43,7 @@ static void standard_accept_connection(struct event_context *ev, struct fd_event pid_t pid; /* accept an incoming connection. */ - status = socket_accept(server_socket->socket, &sock, 0); + status = socket_accept(server_socket->socket, &sock); if (!NT_STATUS_IS_OK(status)) { DEBUG(0,("standard_accept_connection: accept: %s\n", nt_errstr(status))); diff --git a/source4/smbd/process_thread.c b/source4/smbd/process_thread.c index 108b098b8a..2b8746efb2 100644 --- a/source4/smbd/process_thread.c +++ b/source4/smbd/process_thread.c @@ -58,7 +58,7 @@ static void thread_accept_connection(struct event_context *ev, struct fd_event * struct server_connection *conn; /* accept an incoming connection. */ - status = socket_accept(server_socket->socket, &sock, 0); + status = socket_accept(server_socket->socket, &sock); if (!NT_STATUS_IS_OK(status)) { DEBUG(0,("accept_connection_single: accept: %s\n", nt_errstr(status))); -- cgit