The branch, master has been updated
       via  07386bb s3: Remove "size" param from switch_message
       via  c99d245 s3: Remove "size" param from smb_dump
      from  14d3137 s3-lsasd: Fix debug messages on registration failure

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


- Log -----------------------------------------------------------------
commit 07386bb5331a22c7dcfc4fef1ae527f20ce279e6
Author: Volker Lendecke <[email protected]>
Date:   Mon Mar 5 13:28:07 2012 +0100

    s3: Remove "size" param from switch_message
    
    Autobuild-User: Volker Lendecke <[email protected]>
    Autobuild-Date: Mon Mar  5 15:13:49 CET 2012 on sn-devel-104

commit c99d245548e5fcf0a89b79749e52967dc29c012c
Author: Volker Lendecke <[email protected]>
Date:   Mon Mar 5 13:28:07 2012 +0100

    s3: Remove "size" param from smb_dump

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

Summary of changes:
 source3/smbd/process.c |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 6c92755..15e1efe 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -1304,15 +1304,16 @@ void reply_outbuf(struct smb_request *req, uint8 
num_words, uint32 num_bytes)
  Dump a packet to a file.
 ********************************************************************/
 
-static void smb_dump(const char *name, int type, const char *data, ssize_t len)
+static void smb_dump(const char *name, int type, const char *data)
 {
+       size_t len;
        int fd, i;
        char *fname = NULL;
        if (DEBUGLEVEL < 50) {
                return;
        }
 
-       if (len < 4) len = smb_len(data)+4;
+       len = smb_len_tcp(data)+4;
        for (i=1;i<100;i++) {
                if (asprintf(&fname, "/tmp/%s.%d.%s", name, i,
                             type ? "req" : "resp") == -1) {
@@ -1344,7 +1345,7 @@ static void smb_dump(const char *name, int type, const 
char *data, ssize_t len)
  find.
 ****************************************************************************/
 
-static connection_struct *switch_message(uint8 type, struct smb_request *req, 
int size)
+static connection_struct *switch_message(uint8 type, struct smb_request *req)
 {
        int flags;
        uint16 session_tag;
@@ -1356,7 +1357,7 @@ static connection_struct *switch_message(uint8 type, 
struct smb_request *req, in
 
        if (smb_messages[type].fn == NULL) {
                DEBUG(0,("Unknown message type %d!\n",type));
-               smb_dump("Unknown", 1, (const char *)req->inbuf, size);
+               smb_dump("Unknown", 1, (const char *)req->inbuf);
                reply_unknown_new(req, type);
                return NULL;
        }
@@ -1370,7 +1371,7 @@ static connection_struct *switch_message(uint8 type, 
struct smb_request *req, in
        DEBUG(3,("switch message %s (pid %d) conn 0x%lx\n", smb_fn_name(type),
                 (int)sys_getpid(), (unsigned long)conn));
 
-       smb_dump(smb_fn_name(type), 1, (const char *)req->inbuf, size);
+       smb_dump(smb_fn_name(type), 1, (const char *)req->inbuf);
 
        /* Ensure this value is replaced in the incoming packet. */
        SSVAL(discard_const_p(uint8_t, req->inbuf),smb_uid,session_tag);
@@ -1518,7 +1519,7 @@ static void construct_reply(struct smbd_server_connection 
*sconn,
                SMB_PERFCOUNT_SET_MSGLEN_IN(&req->pcd, size);
        }
 
-       conn = switch_message(req->cmd, req, size);
+       conn = switch_message(req->cmd, req);
 
        if (req->unread_bytes) {
                /* writeX failed. drain socket. */
@@ -2063,7 +2064,7 @@ void chain_reply(struct smb_request *req)
        req->buflen = buflen;
        req->buf = buf;
 
-       switch_message(chain_cmd, req, smblen);
+       switch_message(chain_cmd, req);
 
        if (req->outbuf == NULL) {
                /*


-- 
Samba Shared Repository

Reply via email to