summaryrefslogtreecommitdiff
path: root/source3/lib/util_sock.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/util_sock.c')
-rw-r--r--source3/lib/util_sock.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c
index 4a67fa00aa..e9859dfa17 100644
--- a/source3/lib/util_sock.c
+++ b/source3/lib/util_sock.c
@@ -526,6 +526,7 @@ BOOL receive_smb(int fd,char *buffer, unsigned int timeout)
BOOL client_receive_smb(int fd,char *buffer, unsigned int timeout)
{
BOOL ret;
+ uint8 msg_type;
for(;;)
{
@@ -539,9 +540,18 @@ BOOL client_receive_smb(int fd,char *buffer, unsigned int timeout)
}
/* Ignore session keepalive packets. */
- if(CVAL(buffer,0) != 0x85)
+ msg_type = CVAL(buffer,0);
+ if (msg_type != 0x85)
break;
}
+ if (msg_type == 0)
+ {
+ show_msg(buffer);
+ }
+ else
+ {
+ dump_data(10, buffer, smb_len(buffer) + 4);
+ }
show_msg(buffer);
return ret;
}