Browse Source

Merged in archang/ckpool (pull request #4)

Fix url resolving error when using numeric ipv6 address with square brackets
master
Con Kolivas 10 years ago
parent
commit
8a106dea9f
  1. 6
      src/libckpool.c

6
src/libckpool.c

@ -353,6 +353,12 @@ bool extract_sockaddr(char *url, char **sockaddr_url, char **sockaddr_port)
} else } else
url_len = strlen(url_begin); url_len = strlen(url_begin);
/* Get rid of the [] */
if (ipv6_begin && ipv6_end && ipv6_end > ipv6_begin){
url_len -= 2;
url_begin++;
}
if (url_len < 1) { if (url_len < 1) {
LOGWARNING("Null length URL passed to extract_sockaddr"); LOGWARNING("Null length URL passed to extract_sockaddr");
return false; return false;

Loading…
Cancel
Save