From e85b4c67372900013faa7793db0f7e664d5bca2e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 3 May 2020 12:35:27 +0300 Subject: fixes #2374 (Update libtox to 0.2.12) --- protocols/Tox/libtox/src/toxcore/network.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'protocols/Tox/libtox/src/toxcore/network.c') diff --git a/protocols/Tox/libtox/src/toxcore/network.c b/protocols/Tox/libtox/src/toxcore/network.c index d3284c4d26..e5a5833109 100644 --- a/protocols/Tox/libtox/src/toxcore/network.c +++ b/protocols/Tox/libtox/src/toxcore/network.c @@ -759,7 +759,7 @@ Networking_Core *new_networking_ex(const Logger *log, IP ip, uint16_t port_from, /* maybe check for invalid IPs like 224+.x.y.z? if there is any IP set ever */ if (!net_family_is_ipv4(ip.family) && !net_family_is_ipv6(ip.family)) { - LOGGER_ERROR(log, "invalid address family: %u\n", ip.family.value); + LOGGER_ERROR(log, "invalid address family: %u", ip.family.value); return nullptr; } @@ -956,6 +956,10 @@ Networking_Core *new_networking_ex(const Logger *log, IP ip, uint16_t port_from, Networking_Core *new_networking_no_udp(const Logger *log) { + if (networking_at_startup() != 0) { + return nullptr; + } + /* this is the easiest way to completely disable UDP without changing too much code. */ Networking_Core *net = (Networking_Core *)calloc(1, sizeof(Networking_Core)); -- cgit v1.2.3