[SCM] Samba Shared Repository - branch master updated

Volker Lendecke vlendec at samba.org
Wed Apr 13 11:00:01 MDT 2011


The branch, master has been updated
       via  4b3fe52 s3-cli_pipe: fix timeout in rpc_pipe_open_tcp_port().
       via  8b80141 s3-util_sock: very brief documentation for open_socket_out().
      from  015511d s3: Make send_nt_replies() static

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 4b3fe5247a6e16b1ad9f05269e9aa00e3120e36a
Author: Günther Deschner <gd at samba.org>
Date:   Wed Apr 13 17:41:36 2011 +0200

    s3-cli_pipe: fix timeout in rpc_pipe_open_tcp_port().
    
    Make sure we use a timeout of 60 seconds, not 60 milliseconds...
    
    This prevented us from successfully using the ncacn_ip_tcp client in a lot of
    places, I guess.
    
    Guenther
    
    Autobuild-User: Volker Lendecke <vlendec at samba.org>
    Autobuild-Date: Wed Apr 13 18:59:19 CEST 2011 on sn-devel-104

commit 8b8014198c16a11f48e13e2c11f3114cd20ad8d3
Author: Günther Deschner <gd at samba.org>
Date:   Wed Apr 13 17:35:44 2011 +0200

    s3-util_sock: very brief documentation for open_socket_out().
    
    The most important bit is to document that timeout is in MILLIseconds, not
    seconds.
    
    Guenther

-----------------------------------------------------------------------

Summary of changes:
 source3/lib/util_sock.c       |   10 ++++++++++
 source3/rpc_client/cli_pipe.c |    2 +-
 2 files changed, 11 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c
index b010c99..71f6a8f 100644
--- a/source3/lib/util_sock.c
+++ b/source3/lib/util_sock.c
@@ -983,6 +983,16 @@ NTSTATUS open_socket_out_recv(struct tevent_req *req, int *pfd)
 	return NT_STATUS_OK;
 }
 
+/**
+* @brief open a socket
+*
+* @param pss a struct sockaddr_storage defining the address to connect to
+* @param port to connect to
+* @param timeout in MILLISECONDS
+* @param pfd file descriptor returned
+*
+* @return NTSTATUS code
+*/
 NTSTATUS open_socket_out(const struct sockaddr_storage *pss, uint16_t port,
 			 int timeout, int *pfd)
 {
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index cf9e0e3..02103e1 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -2459,7 +2459,7 @@ static NTSTATUS rpc_pipe_open_tcp_port(TALLOC_CTX *mem_ctx, const char *host,
 		goto fail;
 	}
 
-	status = open_socket_out(&addr, port, 60, &fd);
+	status = open_socket_out(&addr, port, 60*1000, &fd);
 	if (!NT_STATUS_IS_OK(status)) {
 		goto fail;
 	}


-- 
Samba Shared Repository


More information about the samba-cvs mailing list