1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

libsmb: Make sure that the TCP socket is non-blocking

All traffic goes through smbXcli_base.c, and that is prepared to deal
with short writes via the conn->outgoing queue. Instead of making sure
that all callers properly set the socket nonblocking, do it here, so
that we can later optimize sending out data to the server.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
Volker Lendecke 2020-03-20 11:46:43 +01:00 committed by Stefan Metzmacher
parent f52f531771
commit 0e50ed1936

View File

@ -338,6 +338,7 @@ struct smbXcli_conn *smbXcli_conn_create(TALLOC_CTX *mem_ctx,
return NULL; return NULL;
} }
set_blocking(fd, false);
conn->sock_fd = fd; conn->sock_fd = fd;
conn->remote_name = talloc_strdup(conn, remote_name); conn->remote_name = talloc_strdup(conn, remote_name);