mirror of
https://github.com/M66B/NetGuard.git
synced 2024-12-23 00:08:37 +00:00
2.241 release
Fixed send hanging
This commit is contained in:
parent
06733982bf
commit
7b5b9d0456
2 changed files with 6 additions and 5 deletions
|
@ -9,10 +9,10 @@ android {
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId = "eu.faircode.netguard"
|
applicationId = "eu.faircode.netguard"
|
||||||
versionName = "2.240"
|
versionName = "2.241"
|
||||||
minSdkVersion 22
|
minSdkVersion 22
|
||||||
targetSdkVersion 28
|
targetSdkVersion 28
|
||||||
versionCode = 2019050501
|
versionCode = 2019050601
|
||||||
archivesBaseName = "NetGuard-v$versionName"
|
archivesBaseName = "NetGuard-v$versionName"
|
||||||
|
|
||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
|
|
|
@ -145,7 +145,7 @@ int monitor_tcp_session(const struct arguments *args, struct ng_session *s, int
|
||||||
// Check for outgoing data
|
// Check for outgoing data
|
||||||
if (s->tcp.forward != NULL) {
|
if (s->tcp.forward != NULL) {
|
||||||
uint32_t buffer_size = (uint32_t) get_receive_buffer(s);
|
uint32_t buffer_size = (uint32_t) get_receive_buffer(s);
|
||||||
if (s->tcp.forward->seq + s->tcp.forward->sent == s->tcp.remote_seq &&
|
if (s->tcp.forward->seq == s->tcp.remote_seq &&
|
||||||
s->tcp.forward->len - s->tcp.forward->sent < buffer_size)
|
s->tcp.forward->len - s->tcp.forward->sent < buffer_size)
|
||||||
events = events | EPOLLOUT;
|
events = events | EPOLLOUT;
|
||||||
else
|
else
|
||||||
|
@ -459,7 +459,7 @@ void check_tcp_socket(const struct arguments *args,
|
||||||
// Forward data
|
// Forward data
|
||||||
uint32_t buffer_size = (uint32_t) get_receive_buffer(s);
|
uint32_t buffer_size = (uint32_t) get_receive_buffer(s);
|
||||||
while (s->tcp.forward != NULL &&
|
while (s->tcp.forward != NULL &&
|
||||||
s->tcp.forward->seq + s->tcp.forward->sent == s->tcp.remote_seq &&
|
s->tcp.forward->seq == s->tcp.remote_seq &&
|
||||||
s->tcp.forward->len - s->tcp.forward->sent < buffer_size) {
|
s->tcp.forward->len - s->tcp.forward->sent < buffer_size) {
|
||||||
log_android(ANDROID_LOG_DEBUG, "%s fwd %u...%u sent %u",
|
log_android(ANDROID_LOG_DEBUG, "%s fwd %u...%u sent %u",
|
||||||
session,
|
session,
|
||||||
|
@ -488,9 +488,10 @@ void check_tcp_socket(const struct arguments *args,
|
||||||
buffer_size -= sent;
|
buffer_size -= sent;
|
||||||
s->tcp.sent += sent;
|
s->tcp.sent += sent;
|
||||||
s->tcp.forward->sent += sent;
|
s->tcp.forward->sent += sent;
|
||||||
s->tcp.remote_seq = s->tcp.forward->seq + s->tcp.forward->sent;
|
|
||||||
|
|
||||||
if (s->tcp.forward->len == s->tcp.forward->sent) {
|
if (s->tcp.forward->len == s->tcp.forward->sent) {
|
||||||
|
s->tcp.remote_seq = s->tcp.forward->seq + s->tcp.forward->sent;
|
||||||
|
|
||||||
struct segment *p = s->tcp.forward;
|
struct segment *p = s->tcp.forward;
|
||||||
s->tcp.forward = s->tcp.forward->next;
|
s->tcp.forward = s->tcp.forward->next;
|
||||||
free(p->data);
|
free(p->data);
|
||||||
|
|
Loading…
Reference in a new issue