svn commit: samba r1824 - branches/SAMBA_4_0/source/libcli/raw
tridge at samba.org
tridge at samba.org
Sat Aug 14 18:24:34 GMT 2004
Author: tridge
Date: 2004-08-14 18:24:33 +0000 (Sat, 14 Aug 2004)
New Revision: 1824
WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/&rev=1824&nolog=1
Log:
nicer handling of NBT session replies, and handling of bad packets
with the async SMB code
Modified:
branches/SAMBA_4_0/source/libcli/raw/clitransport.c
branches/SAMBA_4_0/source/libcli/raw/rawrequest.c
Changeset:
Modified: branches/SAMBA_4_0/source/libcli/raw/clitransport.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/raw/clitransport.c 2004-08-14 16:40:51 UTC (rev 1823)
+++ branches/SAMBA_4_0/source/libcli/raw/clitransport.c 2004-08-14 18:24:33 UTC (rev 1824)
@@ -353,6 +353,12 @@
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;
Modified: branches/SAMBA_4_0/source/libcli/raw/rawrequest.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/raw/rawrequest.c 2004-08-14 16:40:51 UTC (rev 1823)
+++ branches/SAMBA_4_0/source/libcli/raw/rawrequest.c 2004-08-14 18:24:33 UTC (rev 1824)
@@ -252,7 +252,7 @@
To cope with this req->out.ptr is supplied. This will be updated to
point at the same offset into the packet as before this call
*/
-static void smbcli_req_grow_data(struct smbcli_request *req, uint_t new_size)
+void smbcli_req_grow_data(struct smbcli_request *req, uint_t new_size)
{
int delta;
@@ -299,7 +299,7 @@
event_loop_once(req->transport->event.ctx);
}
- return True;
+ return req->state == SMBCLI_REQUEST_DONE;
}
More information about the samba-cvs
mailing list