From 0e50ed193606c3716bcd3955e6305f6891f34cff Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 20 Mar 2020 11:46:43 +0100 Subject: 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 Reviewed-by: Stefan Metzmacher --- libcli/smb/smbXcli_base.c | 1 + 1 file changed, 1 insertion(+) (limited to 'libcli') diff --git a/libcli/smb/smbXcli_base.c b/libcli/smb/smbXcli_base.c index 0115cbbec18..895fa64fcf5 100644 --- a/libcli/smb/smbXcli_base.c +++ b/libcli/smb/smbXcli_base.c @@ -338,6 +338,7 @@ struct smbXcli_conn *smbXcli_conn_create(TALLOC_CTX *mem_ctx, return NULL; } + set_blocking(fd, false); conn->sock_fd = fd; conn->remote_name = talloc_strdup(conn, remote_name); -- cgit v1.2.1