summaryrefslogtreecommitdiff
path: root/source4/libcli/raw/clitransport.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-08-14 18:24:33 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:58:00 -0500
commit39686072d5539003f8a2e2679311c5057ee82041 (patch)
tree673450f1d606ff39792d7969e936307beec6c468 /source4/libcli/raw/clitransport.c
parentc17a1daf63be43e2ce67a978555646f12103d904 (diff)
downloadsamba-39686072d5539003f8a2e2679311c5057ee82041.tar.gz
samba-39686072d5539003f8a2e2679311c5057ee82041.tar.bz2
samba-39686072d5539003f8a2e2679311c5057ee82041.zip
r1824: nicer handling of NBT session replies, and handling of bad packets
with the async SMB code (This used to be commit cef94978f43a8326b6cf1888c15ca8c568ebe9f8)
Diffstat (limited to 'source4/libcli/raw/clitransport.c')
-rw-r--r--source4/libcli/raw/clitransport.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/libcli/raw/clitransport.c b/source4/libcli/raw/clitransport.c
index 784a6f1798..03a0540be0 100644
--- a/source4/libcli/raw/clitransport.c
+++ b/source4/libcli/raw/clitransport.c
@@ -353,6 +353,12 @@ static void smbcli_transport_finish_recv(struct smbcli_transport *transport)
req->in.size = len;
req->in.allocated = req->in.size;
+ /* handle NBT session replies */
+ if (req->in.buffer[0] != 0) {
+ req->status = NT_STATUS_OK;
+ goto async;
+ }
+
/* handle non-SMB replies */
if (req->in.size < NBT_HDR_SIZE + MIN_SMB_SIZE) {
req->state = SMBCLI_REQUEST_ERROR;