| 2341 | } |
| 2342 | |
| 2343 | int parseClusterNodeAddress(char *addr, char **ip_ptr, int *port_ptr, |
| 2344 | int *bus_port_ptr) |
| 2345 | { |
| 2346 | char *c = strrchr(addr, '@'); |
| 2347 | if (c != NULL) { |
| 2348 | *c = '\0'; |
| 2349 | if (bus_port_ptr != NULL) |
| 2350 | *bus_port_ptr = atoi(c + 1); |
| 2351 | } |
| 2352 | c = strrchr(addr, ':'); |
| 2353 | if (c != NULL) { |
| 2354 | *c = '\0'; |
| 2355 | *ip_ptr = addr; |
| 2356 | *port_ptr = atoi(++c); |
| 2357 | } else return 0; |
| 2358 | return 1; |
| 2359 | } |
| 2360 | |
| 2361 | /* Get host ip and port from command arguments. If only one argument has |
| 2362 | * been provided it must be in the form of 'ip:port', elsewhere |
no outgoing calls
no test coverage detected