1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-11-13 00:53:01 +01:00

If IPv6 fails, print something and try IPv4.

This commit is contained in:
irungentoo 2013-12-06 21:43:57 -05:00
parent d232538317
commit 6089f02d57

View File

@ -98,6 +98,11 @@ static Tox *init_tox(int ipv4)
int ipv6 = !ipv4;
Tox *m = tox_new(ipv6);
if (TOX_ENABLE_IPV6_DEFAULT && m == NULL) {
fprintf(stderr, "IPv6 didn't initialize, trying IPv4 only\n");
m = tox_new(0);
}
if (m == NULL)
return NULL;