| 2610 | } |
| 2611 | |
| 2612 | static int parseClusterNodeAddress(char *addr, char **ip_ptr, int *port_ptr, |
| 2613 | int *bus_port_ptr) |
| 2614 | { |
| 2615 | char *c = strrchr(addr, '@'); |
| 2616 | if (c != NULL) { |
| 2617 | *c = '\0'; |
| 2618 | if (bus_port_ptr != NULL) |
| 2619 | *bus_port_ptr = atoi(c + 1); |
| 2620 | } |
| 2621 | c = strrchr(addr, ':'); |
| 2622 | if (c != NULL) { |
| 2623 | *c = '\0'; |
| 2624 | *ip_ptr = addr; |
| 2625 | *port_ptr = atoi(++c); |
| 2626 | } else return 0; |
| 2627 | return 1; |
| 2628 | } |
| 2629 | |
| 2630 | /* Get host ip and port from command arguments. If only one argument has |
| 2631 | * been provided it must be in the form of 'ip:port', elsewhere |
no test coverage detected