Merge pull request #2096 from mattsta/cluster-ipv6

Enable Cluster IPv6 Support
This commit is contained in:
Salvatore Sanfilippo
2014-10-31 10:38:22 +01:00
2 changed files with 8 additions and 6 deletions

View File

@ -178,7 +178,7 @@ int clusterLoadConfig(char *filename) {
clusterAddNode(n);
}
/* Address and port */
if ((p = strchr(argv[1],':')) == NULL) goto fmterr;
if ((p = strrchr(argv[1],':')) == NULL) goto fmterr;
*p = '\0';
memcpy(n->ip,argv[1],strlen(argv[1])+1);
n->port = atoi(p+1);