Do simpler things to create wildcard domains

This commit is contained in:
2017-09-14 20:20:42 +02:00
parent 5a1d6c7390
commit f98cc4a863
2 changed files with 10 additions and 22 deletions

View File

@@ -297,20 +297,13 @@ static char* wildcard_domain(char* domain)
}
// Final level
level_length[cur_level] = tmp - level_ptr[cur_level-1];
level_length[cur_level-1] = tmp - level_ptr[cur_level-1];
tmp = NULL;
if (cur_level >= 3)
if (cur_level > 2)
{
// Seems to be a two level root domain (ie zzz.xxx.co.uk ...)
if (level_length[cur_level-2] <= 3)
{
if (cur_level > 3)
tmp = level_ptr[cur_level-3];
}
else
// Standard root domain (zzz.xxx.com)
tmp = level_ptr[cur_level-2];
// Standard root domain (zzz.xxx.com) or more
tmp = level_ptr[1];
}
// Simple xxx.com
else if (cur_level == 2)