0
0
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:
ruti 2025-02-05 17:43:01 +03:00
parent bf6e028c6b
commit 764136eaad
2 changed files with 5 additions and 1 deletions

View File

@ -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;
}

2
main.c
View File

@ -25,7 +25,7 @@
#define close(fd) closesocket(fd)
#endif
#define VERSION "16.4"
#define VERSION "16.5"
ASSERT(sizeof(struct in_addr) == 4)
ASSERT(sizeof(struct in6_addr) == 16)