summaryrefslogtreecommitdiff
path: root/protocols/Tox/libtox/src/toxcore/network.c
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-05-03 12:35:27 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-05-03 12:35:27 +0300
commite85b4c67372900013faa7793db0f7e664d5bca2e (patch)
treea30aea519d9c2672ed4a50d32a6ad43acd285497 /protocols/Tox/libtox/src/toxcore/network.c
parentcb012794fa0ed74ed57607048dcafc6b06419ba7 (diff)
fixes #2374 (Update libtox to 0.2.12)
Diffstat (limited to 'protocols/Tox/libtox/src/toxcore/network.c')
-rw-r--r--protocols/Tox/libtox/src/toxcore/network.c6
1 files changed, 5 insertions, 1 deletions
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));