Skip to content

Commit

Permalink
32da364 is wrong: it does effect data-in but it should not limit the …
Browse files Browse the repository at this point in the history
…total, only each segment
  • Loading branch information
folkertvanheusden committed Oct 11, 2024
1 parent 32da364 commit 711e123
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ bool server::push_response(com_client *const cc, session *const ses, iscsi_pdu_b

while(offset < offset_end) {
uint64_t bytes_left = offset_end - offset;
uint32_t current_n = std::min(bytes_left, buffer_n);
uint32_t current_n = std::min(uint64_t(ses->get_max_seg_len()), std::min(bytes_left, buffer_n));
bool last_block = offset + current_n == offset_end;

std::optional<std::pair<residual, uint32_t> > has_residual;
Expand Down

0 comments on commit 711e123

Please sign in to comment.