diff options
Diffstat (limited to 'source4/libcli')
-rw-r--r-- | source4/libcli/raw/clitransport.c | 6 | ||||
-rw-r--r-- | source4/libcli/raw/rawrequest.c | 4 |
2 files changed, 8 insertions, 2 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; diff --git a/source4/libcli/raw/rawrequest.c b/source4/libcli/raw/rawrequest.c index 70e924a99f..bc87af4297 100644 --- a/source4/libcli/raw/rawrequest.c +++ b/source4/libcli/raw/rawrequest.c @@ -252,7 +252,7 @@ static void smbcli_req_grow_allocation(struct smbcli_request *req, uint_t new_si 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 @@ BOOL smbcli_request_receive(struct smbcli_request *req) event_loop_once(req->transport->event.ctx); } - return True; + return req->state == SMBCLI_REQUEST_DONE; } |