mirror of
https://github.com/samba-team/samba.git
synced 2025-12-06 16:23:49 +03:00
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 commit is contained in:
committed by
Gerald (Jerry) Carter
parent
a2d92aa431
commit
406d356e69
@@ -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)));
|
||||
|
||||
@@ -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)));
|
||||
|
||||
@@ -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)));
|
||||
|
||||
Reference in New Issue
Block a user