This commit is contained in:
Evgeny committed 2026-03-27 15:14:07 +03:00
1 parent 603cfd8c58
commit 8030161ea6
3 files changed
+18 -8

No files matched your search

+15 -7
View File
@@ -580,7 +580,8 @@ static void ack_timeout_check(struct ETCP_CONN* etcp) {
struct ll_entry* current;
while (current = etcp->input_wait_ack->head) {
current = etcp->input_wait_ack->head;
while (current) {
struct INFLIGHT_PACKET* pkt = (struct INFLIGHT_PACKET*)current;
int64_t elapsed = now - pkt->last_timestamp;
@@ -611,6 +612,7 @@ static void ack_timeout_check(struct ETCP_CONN* etcp) {
DEBUG_DEBUG(DEBUG_CATEGORY_ETCP, "[%s] retransmission timer set for %llu units", etcp->log_name, next_timeout);
return;
}
current = etcp->input_wait_ack->head;
}
queue_resume_callback(etcp->input_wait_ack);
}
@@ -696,8 +698,10 @@ static void etcp_conn_process_send_queue(struct ETCP_CONN* etcp) {// вызыв
DEBUG_DEBUG(DEBUG_CATEGORY_ETCP, "[%s] TX state: %d (link not ready, skip send)", etcp->log_name, etcp->tx_state);
return;
}
while(dgram = etcp_request_pkt(etcp)) {
dgram = etcp_request_pkt(etcp);
while(dgram) {
etcp_loadbalancer_send(dgram);
dgram = etcp_request_pkt(etcp);
}
}
@@ -933,15 +937,19 @@ void etcp_ack_recv(struct ETCP_CONN* etcp, uint32_t seq, uint16_t ts, uint16_t d
// Find the acknowledged packet in the wait_ack queue
struct INFLIGHT_PACKET* acked_pkt;
if (acked_pkt = (struct INFLIGHT_PACKET*)queue_find_data_by_id(etcp->input_wait_ack, seq)) {
acked_pkt = (struct INFLIGHT_PACKET*)queue_find_data_by_id(etcp->input_wait_ack, seq);
if (acked_pkt) {
etcp->cnt_ack_hit_inf++;
queue_remove_data(etcp->input_wait_ack, (struct ll_entry*)acked_pkt);
}
else if ( acked_pkt = (struct INFLIGHT_PACKET*)queue_find_data_by_id(etcp->input_send_q, seq) ) {
etcp->cnt_ack_hit_sndq++;
queue_remove_data(etcp->input_send_q, (struct ll_entry*)acked_pkt);
else {
acked_pkt = (struct INFLIGHT_PACKET*)queue_find_data_by_id(etcp->input_send_q, seq);
if (acked_pkt) {
etcp->cnt_ack_hit_sndq++;
queue_remove_data(etcp->input_send_q, (struct ll_entry*)acked_pkt);
}
else etcp->cnt_ack_miss++;
else etcp->cnt_ack_miss++;
}
if (!acked_pkt) {
// Packet might be already acknowledged or not found
+1
View File
@@ -24,6 +24,7 @@
// The core logic (e.g., nonce building, CRC, session key derivation as memcpy, counters, etc.) remains unchanged.
#ifdef USE_OPENSSL
#include <openssl/bn.h>
#include <openssl/evp.h>
#include <openssl/ec.h>
#include <openssl/rand.h>