Make urldb_add_url IPv6-aware

svn path=/trunk/netsurf/; revision=10990
This commit is contained in:
Rob Kendrick 2010-12-04 22:46:33 +00:00
parent 73ace49c5a
commit ab704ba7a7

View File

@ -791,12 +791,13 @@ bool urldb_add_url(const char *url)
host++;
/* get port and remove from host */
colon = strrchr(host, ':');
if (!colon) {
port = 0;
} else {
*colon = '\0';
port = atoi(colon + 1);
port = 0;
if (host[strlen(host)] != ']') {
colon = strrchr(host, ':');
if (colon) {
*colon = '\0';
port = atoi(colon + 1);
}
}
/* Get host entry */