The branch, v3-6-test has been updated
       via  ec1671e s3-cli_pipe: fix timeout in rpc_pipe_open_tcp_port().
       via  e7f38a7 s3-util_sock: very brief documentation for 
open_socket_out().
       via  646cc4d s3-lib Remove unused skip_unibuf()
       via  9ef17d6 s3-lib Remove unused #define
      from  428ae8e s3: Fix Coverity ID 2470: STRAY_SEMICOLON

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -----------------------------------------------------------------
commit ec1671ec9998bc581004fede4f60937d350f4df9
Author: Günther Deschner <[email protected]>
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 <[email protected]>
    Autobuild-Date: Wed Apr 13 18:59:19 CEST 2011 on sn-devel-104
    (cherry picked from commit 4b3fe5247a6e16b1ad9f05269e9aa00e3120e36a)

commit e7f38a78691277778af2cfb5c520643e5c6707c9
Author: Günther Deschner <[email protected]>
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
    (cherry picked from commit 8b8014198c16a11f48e13e2c11f3114cd20ad8d3)

commit 646cc4d380a7b0673afe5d2561f07c3b6e33ffe8
Author: Andrew Bartlett <[email protected]>
Date:   Tue Apr 12 16:10:57 2011 +1000

    s3-lib Remove unused skip_unibuf()
    
    Signed-off-by: Andrew Tridgell <[email protected]>
    (cherry picked from commit ba2b7f72c0459123c6bf88ee1c272e94dbfdcf9b)

commit 9ef17d60bbbe34764dad83478d03ca2d90a11e58
Author: Andrew Bartlett <[email protected]>
Date:   Tue Apr 12 16:11:13 2011 +1000

    s3-lib Remove unused #define
    
    Signed-off-by: Andrew Tridgell <[email protected]>
    (cherry picked from commit a82fba349989376397dbbb07ca3212713424c411)

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

Summary of changes:
 source3/include/proto.h       |    1 -
 source3/lib/util_sock.c       |   10 ++++++++++
 source3/lib/util_unistr.c     |   24 ------------------------
 source3/rpc_client/cli_pipe.c |    2 +-
 4 files changed, 11 insertions(+), 26 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index 3de0859..7fb2ac4 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1080,7 +1080,6 @@ char *sanitize_username(TALLOC_CTX *mem_ctx, const char 
*username);
 void gfree_case_tables(void);
 void load_case_tables(void);
 size_t dos_PutUniCode(char *dst,const char *src, size_t len, bool 
null_terminate);
-char *skip_unibuf(char *src, size_t len);
 int rpcstr_push(void *dest, const char *src, size_t dest_len, int flags);
 int rpcstr_push_talloc(TALLOC_CTX *ctx, smb_ucs2_t **dest, const char *src);
 bool isvalid83_w(smb_ucs2_t c);
diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c
index bf2d93d..787ad94 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/lib/util_unistr.c b/source3/lib/util_unistr.c
index 14b5a87..5204e9b 100644
--- a/source3/lib/util_unistr.c
+++ b/source3/lib/util_unistr.c
@@ -21,10 +21,6 @@
 
 #include "includes.h"
 
-#ifndef MAXUNI
-#define MAXUNI 1024
-#endif
-
 /* these 3 tables define the unicode case handling.  They are loaded
    at startup either via mmap() or read() from the lib directory */
 static uint8 *valid_table;
@@ -83,26 +79,6 @@ size_t dos_PutUniCode(char *dst,const char *src, size_t len, 
bool null_terminate
 }
 
 
-/*******************************************************************
- Skip past a unicode string, but not more than len. Always move
- past a terminating zero if found.
-********************************************************************/
-
-char *skip_unibuf(char *src, size_t len)
-{
-       char *srcend = src + len;
-
-       while (src < srcend && SVAL(src,0)) {
-               src += 2;
-       }
-
-       if(!SVAL(src,0)) {
-               src += 2;
-       }
-
-       return src;
-}
-
 /* Converts a string from internal samba format to unicode
  */
 
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index fb4d5e8..266e436 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

Reply via email to