mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Some small fixes.
Increased interval between onion key changes to 2 hours.
This commit is contained in:
parent
4a987bf751
commit
e4ae993a80
|
@ -87,7 +87,7 @@ static int proxy_http_generate_connection_request(TCP_Client_Connection *TCP_con
|
|||
const int written = snprintf((char *)TCP_conn->last_packet, MAX_PACKET_SIZE, "%s%s:%hu%s%s:%hu%s", one, ip, port, two,
|
||||
ip, port, three);
|
||||
|
||||
if (written < 0) {
|
||||
if (written < 0 || MAX_PACKET_SIZE < written) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -35,8 +35,8 @@
|
|||
#define SEND_2 ONION_SEND_2
|
||||
#define SEND_1 ONION_SEND_1
|
||||
|
||||
/* Change symmetric keys every hour to make paths expire eventually. */
|
||||
#define KEY_REFRESH_INTERVAL (60 * 60)
|
||||
/* Change symmetric keys every 2 hours to make paths expire eventually. */
|
||||
#define KEY_REFRESH_INTERVAL (2 * 60 * 60)
|
||||
static void change_symmetric_key(Onion *onion)
|
||||
{
|
||||
if (is_timeout(onion->timestamp, KEY_REFRESH_INTERVAL)) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user