update toxcore Merge commit '3b6bb15e867a5f3895773554b1cfa928fcfd3e8f'

This commit is contained in:
Green Sky
2025-01-18 15:53:06 +01:00
213 changed files with 2341 additions and 758 deletions

View File

@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-3.0-or-later
* Copyright © 2016-2018 The TokTok team.
* Copyright © 2016-2025 The TokTok team.
* Copyright © 2013 Tox project.
*/
@ -117,10 +117,10 @@ static const char *strlevel(Logger_Level level)
}
}
static void print_log(void *context, Logger_Level level, const char *file, int line,
static void print_log(void *context, Logger_Level level, const char *file, uint32_t line,
const char *func, const char *message, void *userdata)
{
fprintf(stderr, "[%s] %s:%d(%s) %s\n", strlevel(level), file, line, func, message);
fprintf(stderr, "[%s] %s:%u(%s) %s\n", strlevel(level), file, line, func, message);
}
int main(int argc, char *argv[])
@ -159,8 +159,8 @@ int main(int argc, char *argv[])
const uint16_t end_port = start_port + (TOX_PORTRANGE_TO - TOX_PORTRANGE_FROM);
DHT *dht = new_dht(logger, mem, rng, ns, mono_time, new_networking_ex(logger, mem, ns, &ip, start_port, end_port, nullptr), true, true);
Onion *onion = new_onion(logger, mem, mono_time, rng, dht);
Forwarding *forwarding = new_forwarding(logger, rng, mono_time, dht);
GC_Announces_List *gc_announces_list = new_gca_list();
Forwarding *forwarding = new_forwarding(logger, mem, rng, mono_time, dht);
GC_Announces_List *gc_announces_list = new_gca_list(mem);
Onion_Announce *onion_a = new_onion_announce(logger, mem, rng, mono_time, dht);
#ifdef DHT_NODE_EXTRA_PACKETS
@ -245,7 +245,7 @@ int main(int argc, char *argv[])
bool is_waiting_for_dht_connection = true;
uint64_t last_lan_discovery = 0;
const Broadcast_Info *broadcast = lan_discovery_init(ns);
const Broadcast_Info *broadcast = lan_discovery_init(mem, ns);
while (true) {
mono_time_update(mono_time);

View File

@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-3.0-or-later
* Copyright © 2016-2024 The TokTok team.
* Copyright © 2016-2025 The TokTok team.
* Copyright © 2015-2016 Tox project.
*/

View File

@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-3.0-or-later
* Copyright © 2016-2018 The TokTok team.
* Copyright © 2016-2025 The TokTok team.
* Copyright © 2015-2016 Tox project.
*/

View File

@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-3.0-or-later
* Copyright © 2016-2024 The TokTok team.
* Copyright © 2016-2025 The TokTok team.
* Copyright © 2014-2016 Tox project.
*/

View File

@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-3.0-or-later
* Copyright © 2016-2024 The TokTok team.
* Copyright © 2016-2025 The TokTok team.
* Copyright © 2014-2016 Tox project.
*/

View File

@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-3.0-or-later
* Copyright © 2016-2024 The TokTok team.
* Copyright © 2016-2025 The TokTok team.
* Copyright © 2014-2016 Tox project.
*/

View File

@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-3.0-or-later
* Copyright © 2016-2018 The TokTok team.
* Copyright © 2016-2025 The TokTok team.
* Copyright © 2014-2016 Tox project.
*/

View File

@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-3.0-or-later
* Copyright © 2016-2018 The TokTok team.
* Copyright © 2016-2025 The TokTok team.
* Copyright © 2015-2016 Tox project.
*/

View File

@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-3.0-or-later
* Copyright © 2016-2018 The TokTok team.
* Copyright © 2016-2025 The TokTok team.
* Copyright © 2015-2016 Tox project.
*/

View File

@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-3.0-or-later
* Copyright © 2016-2018 The TokTok team.
* Copyright © 2016-2025 The TokTok team.
* Copyright © 2015-2016 Tox project.
*/

View File

@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-3.0-or-later
* Copyright © 2016-2018 The TokTok team.
* Copyright © 2016-2025 The TokTok team.
* Copyright © 2015-2016 Tox project.
*/

View File

@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-3.0-or-later
* Copyright © 2016-2018 The TokTok team.
* Copyright © 2016-2025 The TokTok team.
* Copyright © 2015-2016 Tox project.
*/

View File

@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-3.0-or-later
* Copyright © 2016-2018 The TokTok team.
* Copyright © 2016-2025 The TokTok team.
* Copyright © 2015-2016 Tox project.
*/

View File

@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-3.0-or-later
* Copyright © 2016-2024 The TokTok team.
* Copyright © 2016-2025 The TokTok team.
* Copyright © 2014-2016 Tox project.
*/
@ -200,10 +200,10 @@ static LOG_LEVEL logger_level_to_log_level(Logger_Level level)
}
}
static void toxcore_logger_callback(void *context, Logger_Level level, const char *file, int line,
static void toxcore_logger_callback(void *context, Logger_Level level, const char *file, uint32_t line,
const char *func, const char *message, void *userdata)
{
log_write(logger_level_to_log_level(level), "%s:%d(%s) %s\n", file, line, func, message);
log_write(logger_level_to_log_level(level), "%s:%u(%s) %s\n", file, line, func, message);
}
static volatile sig_atomic_t caught_signal = 0;
@ -348,7 +348,7 @@ int main(int argc, char *argv[])
return 1;
}
Forwarding *forwarding = new_forwarding(logger, rng, mono_time, dht);
Forwarding *forwarding = new_forwarding(logger, mem, rng, mono_time, dht);
if (forwarding == nullptr) {
log_write(LOG_LEVEL_ERROR, "Couldn't initialize forwarding. Exiting.\n");
@ -377,7 +377,7 @@ int main(int argc, char *argv[])
return 1;
}
GC_Announces_List *group_announce = new_gca_list();
GC_Announces_List *group_announce = new_gca_list(mem);
if (group_announce == nullptr) {
log_write(LOG_LEVEL_ERROR, "Couldn't initialize group announces. Exiting.\n");
@ -563,7 +563,7 @@ int main(int argc, char *argv[])
Broadcast_Info *broadcast = nullptr;
if (enable_lan_discovery) {
broadcast = lan_discovery_init(ns);
broadcast = lan_discovery_init(mem, ns);
log_write(LOG_LEVEL_INFO, "Initialized LAN discovery successfully.\n");
}

View File

@ -1,7 +1,7 @@
module github.com/TokTok/c-toxcore/other/bootstrap_daemon/websocket/websockify
go 1.17
go 1.20
require github.com/gorilla/websocket v1.5.1
require github.com/gorilla/websocket v1.5.3
require golang.org/x/net v0.23.0 // indirect
require golang.org/x/net v0.33.0 // indirect

View File

@ -9,7 +9,7 @@
// - Proper error handling in general.
// - Support both websocket and regular GET requests on /.
//
// Copyright 2022 The TokTok team.
// Copyright 2022-2025 The TokTok team.
// Copyright 2021 Michael.liu.
// See LICENSE for licensing conditions.

View File

@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-3.0-or-later
* Copyright © 2016-2018 The TokTok team.
* Copyright © 2016-2025 The TokTok team.
* Copyright © 2013 Tox project.
*/

View File

@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-3.0-or-later
* Copyright © 2016-2018 The TokTok team.
* Copyright © 2016-2025 The TokTok team.
* Copyright © 2015 Tox project.
*/

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright © 2023-2024 The TokTok team.
// Copyright © 2023-2025 The TokTok team.
// this file can be used to generate event.c files
// requires c++17
@ -156,7 +156,7 @@ void generate_event_impl(const std::string& event_name, const std::vector<EventT
}
f << R"(/* SPDX-License-Identifier: GPL-3.0-or-later
* Copyright © 2023-2024 The TokTok team.
* Copyright © 2023-2025 The TokTok team.
*/
#include "events_alloc.h"
@ -178,6 +178,7 @@ void generate_event_impl(const std::string& event_name, const std::vector<EventT
#include "../ccompat.h"
#include "../mem.h"
#include "../tox.h"
#include "../tox_event.h"
#include "../tox_events.h")";
if (need_tox_unpack_h) {
f << R"(
@ -843,4 +844,3 @@ int main(int argc, char** argv) {
return 0;
}