mirror of
https://github.com/M66B/NetGuard.git
synced 2025-01-30 19:31:26 +00:00
Attempt to fix upload problems
This commit is contained in:
parent
301e07652f
commit
ac0424c498
1 changed files with 5 additions and 2 deletions
|
@ -167,8 +167,11 @@ int monitor_tcp_session(const struct arguments *args, struct ng_session *s, int
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t get_send_window(const struct tcp_session *cur) {
|
uint32_t get_send_window(const struct tcp_session *cur) {
|
||||||
uint32_t behind = (compare_u32(cur->acked, cur->local_seq) <= 0
|
uint32_t behind;
|
||||||
? cur->local_seq - cur->acked : cur->acked);
|
if (cur->acked <= cur->local_seq)
|
||||||
|
behind = (cur->local_seq - cur->acked);
|
||||||
|
else
|
||||||
|
behind = (0x10000 + cur->local_seq - cur->acked);
|
||||||
uint32_t window = (behind < cur->send_window ? cur->send_window - behind : 0);
|
uint32_t window = (behind < cur->send_window ? cur->send_window - behind : 0);
|
||||||
return window;
|
return window;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue