SSVAL(req->out.vwv,VWV(6),0);
SSVAL(req->out.vwv,VWV(7),0);
+ /* this request does not expect a reply, so tell the signing
+ subsystem not to allocate an id for a reply */
+ req->one_way_request = 1;
+
ret = cli_request_send(req);
- cli_request_destroy(req);
return ret;
}
req->out.buffer += ret;
req->out.size -= ret;
if (req->out.size == 0) {
- req->state = CLI_REQUEST_RECV;
DLIST_REMOVE(transport->pending_send, req);
- DLIST_ADD(transport->pending_recv, req);
+ if (req->one_way_request) {
+ req->state = CLI_REQUEST_DONE;
+ cli_request_destroy(req);
+ } else {
+ req->state = CLI_REQUEST_RECV;
+ DLIST_ADD(transport->pending_recv, req);
+ }
}
}
buffer = transport->recv_buffer.buffer;
len = transport->recv_buffer.req_size;
+ ZERO_STRUCT(transport->recv_buffer);
+
hdr = buffer+NBT_HDR_SIZE;
vwv = hdr + HDR_VWV;
/* see if it could be an oplock break request */
if (handle_oplock_break(transport, len, hdr, vwv)) {
talloc_free(transport->mem_ctx, buffer);
- ZERO_STRUCT(transport->recv_buffer);
return;
}
/* if this request has an async handler then call that to
notify that the reply has been received. This might destroy
the request so it must happen last */
- ZERO_STRUCT(transport->recv_buffer);
DLIST_REMOVE(transport->pending_recv, req);
req->state = CLI_REQUEST_DONE;
if (req->async.fn) {
DLIST_REMOVE(transport->pending_recv, req);
req->state = CLI_REQUEST_ERROR;
}
- ZERO_STRUCT(transport->recv_buffer);
}
/*
/* this request does not expect a reply, so tell the signing
subsystem not to allocate an id for a reply */
+ req->sign_single_increment = 1;
req->one_way_request = 1;
cli_request_send(req);
- return cli_request_destroy(req);
+ return NT_STATUS_OK;
}
{
/* we must be very fussy about what we consider an oplock break to avoid
matching readbraw replies */
- if (len != MIN_SMB_SIZE + VWV(8) ||
+ if (len != MIN_SMB_SIZE + VWV(8) + NBT_HDR_SIZE ||
(CVAL(hdr, HDR_FLG) & FLAG_REPLY) ||
CVAL(hdr,HDR_COM) != SMBlockingX ||
SVAL(hdr, HDR_MID) != 0xFFFF ||