1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-12-23 16:13:24 +01:00

Merge pull request #85 from micrictor/master

Fixing fall-back from IPv6 to IPv4
This commit is contained in:
mannol1 2014-03-05 18:11:55 +01:00
commit d712d6c898

View File

@ -115,8 +115,12 @@ 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");
/*
* TOX_ENABLE_IPV6_DEFAULT is always 1.
* Checking it is redundant, this *should* be doing ipv4 fallback
*/
if (ipv6 && m == NULL) {
fprintf(stderr, "IPv6 didn't initialize, trying IPv4\n");
m = tox_new(0);
}