*state = (struct smbd_smb2_request_read_state) {
.req = req,
.min_recv_size = lp_min_receive_file_size(),
+ .vector = (struct iovec) {
+ .iov_base = (void *)state->hdr.nbt,
+ .iov_len = NBT_HDR_SIZE,
+ },
};
TEVENT_FD_READABLE(xconn->transport.fde);
}
again:
- if (!state->hdr.done) {
- state->hdr.done = true;
-
- state->vector.iov_base = (void *)state->hdr.nbt;
- state->vector.iov_len = NBT_HDR_SIZE;
- }
state->msg = (struct msghdr) {
.msg_iov = &state->vector,
*state = (struct smbd_smb2_request_read_state) {
.req = req,
.min_recv_size = lp_min_receive_file_size(),
+ .vector = (struct iovec) {
+ .iov_base = (void *)state->hdr.nbt,
+ .iov_len = NBT_HDR_SIZE,
+ },
};
req = NULL;
goto again;