summaryrefslogtreecommitdiff
path: root/libcli
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2020-03-20 11:46:43 +0100
committerStefan Metzmacher <metze@samba.org>2020-03-25 09:04:28 +0000
commit0e50ed193606c3716bcd3955e6305f6891f34cff (patch)
treea870c41f89865c3408753d3b6c5e67efee22d7fd /libcli
parentf52f531771d6a25b2e363384bf94a9fa14334e1b (diff)
downloadsamba-0e50ed193606c3716bcd3955e6305f6891f34cff.tar.gz
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>
Diffstat (limited to 'libcli')
-rw-r--r--libcli/smb/smbXcli_base.c1
1 files changed, 1 insertions, 0 deletions
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);