summaryrefslogtreecommitdiffstats
path: root/source3/smbd/process.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2012-03-05 13:28:07 +0100
committerVolker Lendecke <vl@samba.org>2012-03-05 13:35:05 +0100
commitc99d245548e5fcf0a89b79749e52967dc29c012c (patch)
treee7e27cc38cd8228af18784a4ef6ab1637026c4de /source3/smbd/process.c
parent14d31376aab703dbb14d1cd786baeaf84361cd96 (diff)
downloadsamba-c99d245548e5fcf0a89b79749e52967dc29c012c.tar.gz
samba-c99d245548e5fcf0a89b79749e52967dc29c012c.tar.xz
samba-c99d245548e5fcf0a89b79749e52967dc29c012c.zip
s3: Remove "size" param from smb_dump
Diffstat (limited to 'source3/smbd/process.c')
-rw-r--r--source3/smbd/process.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 6c927554f1..be21420f99 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) {
@@ -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);