mirror of
https://github.com/hufrea/byedpi.git
synced 2025-06-29 18:21:14 +00:00
Restore positions relative to the start of the request
This commit is contained in:
parent
bf6e028c6b
commit
764136eaad
4
desync.c
4
desync.c
@ -531,6 +531,7 @@ ssize_t desync(struct poolhd *pool,
|
||||
char *buffer = buff->data;
|
||||
size_t bfsize = buff->size;
|
||||
ssize_t offset = buff->offset;
|
||||
ssize_t skip = val->pair->round_sent;
|
||||
|
||||
if (!val->recv_count && params.debug) {
|
||||
init_proto_info(buffer, n, &info);
|
||||
@ -557,6 +558,9 @@ ssize_t desync(struct poolhd *pool,
|
||||
long pos = gen_offset(part.pos, part.flag, buffer, n, lp, &info);
|
||||
pos += (long )part.s * (part.r - r);
|
||||
|
||||
if (skip && pos <= skip && !(part.flag & OFFSET_START)) {
|
||||
continue;
|
||||
}
|
||||
if (offset && pos <= offset) {
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user