]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libsmb: Make sure that the TCP socket is non-blocking
authorVolker Lendecke <vl@samba.org>
Fri, 20 Mar 2020 10:46:43 +0000 (11:46 +0100)
committerStefan Metzmacher <metze@samba.org>
Wed, 25 Mar 2020 09:04:28 +0000 (09:04 +0000)
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>
libcli/smb/smbXcli_base.c

index 0115cbbec1854400e39ceb45161780b6b80d12b9..895fa64fcf5be034c3b8351a4a92282e319d8834 100644 (file)
@@ -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);