Skip to content

Commit fedcdea

Browse files
committed
fix: Reduce logging verbosity in TCP server.
1 parent f41caa2 commit fedcdea

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4ab3745ed27289a0ea66ec5023f7f0c74b77cdcbedb259d610941faf67e7b255 /usr/local/bin/tox-bootstrapd
1+
36b0bc23d8d2e78739afc2e2f6b7d44a822994d365f98bc802728e655d87d503 /usr/local/bin/tox-bootstrapd

toxcore/TCP_server.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ static int handle_TCP_packet(TCP_Server *tcp_server, uint32_t con_id, const uint
583583
return -1;
584584
}
585585

586-
LOGGER_DEBUG(tcp_server->logger, "handling routing request for %d", con_id);
586+
LOGGER_TRACE(tcp_server->logger, "handling routing request for %d", con_id);
587587
return handle_TCP_routing_req(tcp_server, con_id, data + 1);
588588
}
589589

@@ -592,7 +592,7 @@ static int handle_TCP_packet(TCP_Server *tcp_server, uint32_t con_id, const uint
592592
return -1;
593593
}
594594

595-
LOGGER_DEBUG(tcp_server->logger, "handling connection notification for %d", con_id);
595+
LOGGER_TRACE(tcp_server->logger, "handling connection notification for %d", con_id);
596596
break;
597597
}
598598

@@ -601,7 +601,7 @@ static int handle_TCP_packet(TCP_Server *tcp_server, uint32_t con_id, const uint
601601
return -1;
602602
}
603603

604-
LOGGER_DEBUG(tcp_server->logger, "handling disconnect notification for %d", con_id);
604+
LOGGER_TRACE(tcp_server->logger, "handling disconnect notification for %d", con_id);
605605
return rm_connection_index(tcp_server, con, data[1] - NUM_RESERVED_PORTS);
606606
}
607607

@@ -610,7 +610,7 @@ static int handle_TCP_packet(TCP_Server *tcp_server, uint32_t con_id, const uint
610610
return -1;
611611
}
612612

613-
LOGGER_DEBUG(tcp_server->logger, "handling ping for %d", con_id);
613+
LOGGER_TRACE(tcp_server->logger, "handling ping for %d", con_id);
614614

615615
uint8_t response[1 + sizeof(uint64_t)];
616616
response[0] = TCP_PACKET_PONG;
@@ -624,7 +624,7 @@ static int handle_TCP_packet(TCP_Server *tcp_server, uint32_t con_id, const uint
624624
return -1;
625625
}
626626

627-
LOGGER_DEBUG(tcp_server->logger, "handling pong for %d", con_id);
627+
LOGGER_TRACE(tcp_server->logger, "handling pong for %d", con_id);
628628

629629
uint64_t ping_id;
630630
memcpy(&ping_id, data + 1, sizeof(uint64_t));
@@ -645,14 +645,14 @@ static int handle_TCP_packet(TCP_Server *tcp_server, uint32_t con_id, const uint
645645
return -1;
646646
}
647647

648-
LOGGER_DEBUG(tcp_server->logger, "handling oob send for %d", con_id);
648+
LOGGER_TRACE(tcp_server->logger, "handling oob send for %d", con_id);
649649

650650
return handle_TCP_oob_send(tcp_server, con_id, data + 1, data + 1 + CRYPTO_PUBLIC_KEY_SIZE,
651651
length - (1 + CRYPTO_PUBLIC_KEY_SIZE));
652652
}
653653

654654
case TCP_PACKET_ONION_REQUEST: {
655-
LOGGER_DEBUG(tcp_server->logger, "handling onion request for %d", con_id);
655+
LOGGER_TRACE(tcp_server->logger, "handling onion request for %d", con_id);
656656

657657
if (tcp_server->onion) {
658658
if (length <= 1 + CRYPTO_NONCE_SIZE + ONION_SEND_BASE * 2) {
@@ -673,7 +673,7 @@ static int handle_TCP_packet(TCP_Server *tcp_server, uint32_t con_id, const uint
673673
}
674674

675675
case TCP_PACKET_ONION_RESPONSE: {
676-
LOGGER_DEBUG(tcp_server->logger, "handling onion response for %d", con_id);
676+
LOGGER_TRACE(tcp_server->logger, "handling onion response for %d", con_id);
677677
return -1;
678678
}
679679

@@ -683,7 +683,7 @@ static int handle_TCP_packet(TCP_Server *tcp_server, uint32_t con_id, const uint
683683
}
684684

685685
const uint8_t c_id = data[0] - NUM_RESERVED_PORTS;
686-
LOGGER_DEBUG(tcp_server->logger, "handling packet id %d for %d", c_id, con_id);
686+
LOGGER_TRACE(tcp_server->logger, "handling packet id %d for %d", c_id, con_id);
687687

688688
if (c_id >= NUM_CLIENT_CONNECTIONS) {
689689
return -1;
@@ -966,7 +966,7 @@ static bool tcp_process_secure_packet(TCP_Server *tcp_server, uint32_t i)
966966
uint8_t packet[MAX_PACKET_SIZE];
967967
const int len = read_packet_TCP_secure_connection(tcp_server->logger, conn->con.sock, &conn->next_packet_length,
968968
conn->con.shared_key, conn->recv_nonce, packet, sizeof(packet), &conn->con.ip_port);
969-
LOGGER_DEBUG(tcp_server->logger, "processing packet for %d: %d", i, len);
969+
LOGGER_TRACE(tcp_server->logger, "processing packet for %d: %d", i, len);
970970

971971
if (len == 0) {
972972
return false;

0 commit comments

Comments
 (0)