Skip to content

Commit 79eb17a

Browse files
committed
fix: Reduce logging verbosity even more.
1 parent fedcdea commit 79eb17a

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
36b0bc23d8d2e78739afc2e2f6b7d44a822994d365f98bc802728e655d87d503 /usr/local/bin/tox-bootstrapd
1+
739b0d6d431aa5cfd73e81002f09733ec44740c8de8f38eed651dc26c8c9a102 /usr/local/bin/tox-bootstrapd

toxcore/TCP_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ int read_TCP_packet(const Logger *logger, Socket sock, uint8_t *data, uint16_t l
193193
const uint16_t count = net_socket_data_recv_buffer(sock);
194194

195195
if (count < length) {
196-
LOGGER_INFO(logger, "recv buffer has %d bytes, but requested %d bytes", count, length);
196+
LOGGER_TRACE(logger, "recv buffer has %d bytes, but requested %d bytes", count, length);
197197
return -1;
198198
}
199199

toxcore/TCP_server.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ static int read_connection_handshake(const Logger *logger, TCP_Secure_Connection
355355
const int len = read_TCP_packet(logger, con->con.sock, data, TCP_CLIENT_HANDSHAKE_SIZE, &con->con.ip_port);
356356

357357
if (len == -1) {
358-
LOGGER_WARNING(logger, "connection handshake is not ready yet");
358+
LOGGER_TRACE(logger, "connection handshake is not ready yet");
359359
return 0;
360360
}
361361

@@ -904,12 +904,12 @@ static int do_incoming(TCP_Server *tcp_server, uint32_t i)
904904
return -1;
905905
}
906906

907-
LOGGER_DEBUG(tcp_server->logger, "handling incoming TCP connection %d", i);
907+
LOGGER_TRACE(tcp_server->logger, "handling incoming TCP connection %d", i);
908908

909909
const int ret = read_connection_handshake(tcp_server->logger, conn, tcp_server->secret_key);
910910

911911
if (ret == -1) {
912-
LOGGER_DEBUG(tcp_server->logger, "incoming connection %d dropped due to failed handshake", i);
912+
LOGGER_TRACE(tcp_server->logger, "incoming connection %d dropped due to failed handshake", i);
913913
kill_TCP_secure_connection(conn);
914914
return -1;
915915
}
@@ -941,7 +941,7 @@ static int do_unconfirmed(TCP_Server *tcp_server, const Mono_Time *mono_time, ui
941941
return -1;
942942
}
943943

944-
LOGGER_DEBUG(tcp_server->logger, "handling unconfirmed TCP connection %d", i);
944+
LOGGER_TRACE(tcp_server->logger, "handling unconfirmed TCP connection %d", i);
945945

946946
uint8_t packet[MAX_PACKET_SIZE];
947947
const int len = read_packet_TCP_secure_connection(tcp_server->logger, conn->con.sock, &conn->next_packet_length,
@@ -978,7 +978,7 @@ static bool tcp_process_secure_packet(TCP_Server *tcp_server, uint32_t i)
978978
}
979979

980980
if (handle_TCP_packet(tcp_server, i, packet, len) == -1) {
981-
LOGGER_DEBUG(tcp_server->logger, "dropping connection %d: data packet (len=%d) not handled", i, len);
981+
LOGGER_TRACE(tcp_server->logger, "dropping connection %d: data packet (len=%d) not handled", i, len);
982982
kill_accepted(tcp_server, i);
983983
return false;
984984
}
@@ -1088,19 +1088,19 @@ static bool tcp_epoll_process(TCP_Server *tcp_server, const Mono_Time *mono_time
10881088
}
10891089

10901090
case TCP_SOCKET_INCOMING: {
1091-
LOGGER_DEBUG(tcp_server->logger, "incoming connection %d dropped", index);
1091+
LOGGER_TRACE(tcp_server->logger, "incoming connection %d dropped", index);
10921092
kill_TCP_secure_connection(&tcp_server->incoming_connection_queue[index]);
10931093
break;
10941094
}
10951095

10961096
case TCP_SOCKET_UNCONFIRMED: {
1097-
LOGGER_DEBUG(tcp_server->logger, "unconfirmed connection %d dropped", index);
1097+
LOGGER_TRACE(tcp_server->logger, "unconfirmed connection %d dropped", index);
10981098
kill_TCP_secure_connection(&tcp_server->unconfirmed_connection_queue[index]);
10991099
break;
11001100
}
11011101

11021102
case TCP_SOCKET_CONFIRMED: {
1103-
LOGGER_DEBUG(tcp_server->logger, "confirmed connection %d dropped", index);
1103+
LOGGER_TRACE(tcp_server->logger, "confirmed connection %d dropped", index);
11041104
kill_accepted(tcp_server, index);
11051105
break;
11061106
}
@@ -1150,7 +1150,7 @@ static bool tcp_epoll_process(TCP_Server *tcp_server, const Mono_Time *mono_time
11501150
const int index_new = do_incoming(tcp_server, index);
11511151

11521152
if (index_new != -1) {
1153-
LOGGER_DEBUG(tcp_server->logger, "incoming connection %d was accepted as %d", index, index_new);
1153+
LOGGER_TRACE(tcp_server->logger, "incoming connection %d was accepted as %d", index, index_new);
11541154
events[n].events = EPOLLIN | EPOLLET | EPOLLRDHUP;
11551155
events[n].data.u64 = sock.socket | ((uint64_t)TCP_SOCKET_UNCONFIRMED << 32) | ((uint64_t)index_new << 40);
11561156

@@ -1168,7 +1168,7 @@ static bool tcp_epoll_process(TCP_Server *tcp_server, const Mono_Time *mono_time
11681168
const int index_new = do_unconfirmed(tcp_server, mono_time, index);
11691169

11701170
if (index_new != -1) {
1171-
LOGGER_DEBUG(tcp_server->logger, "unconfirmed connection %d was confirmed as %d", index, index_new);
1171+
LOGGER_TRACE(tcp_server->logger, "unconfirmed connection %d was confirmed as %d", index, index_new);
11721172
events[n].events = EPOLLIN | EPOLLET | EPOLLRDHUP;
11731173
events[n].data.u64 = sock.socket | ((uint64_t)TCP_SOCKET_CONFIRMED << 32) | ((uint64_t)index_new << 40);
11741174

0 commit comments

Comments
 (0)