| 74 | } |
| 75 | |
| 76 | static int test_host(char *hoststr, char *host, char *port) |
| 77 | { |
| 78 | int status; |
| 79 | char host2[256], port2[6]; |
| 80 | status = parse_hoststr(hoststr, strlen(hoststr), host2, port2); |
| 81 | |
| 82 | printf("---------------------\n"); |
| 83 | |
| 84 | if (status == 0) |
| 85 | { |
| 86 | if (strcmp(host, host2) || strcmp(port, port2)) |
| 87 | { |
| 88 | printf("%s: Mismatch, expected host=%s, port=%s, got host=%s, port=%s\n", |
| 89 | __func__, |
| 90 | host, port, host2, port2); |
| 91 | return -1; |
| 92 | } |
| 93 | else |
| 94 | { |
| 95 | rig_network_addr(host, port); |
| 96 | } |
| 97 | |
| 98 | printf("%s: %s, host=%s, port=%s\n", __func__, hoststr, host, port); |
| 99 | return 0; |
| 100 | } |
| 101 | else |
| 102 | { |
| 103 | printf("%s: ERROR!! %s, host=%s, port=%s\n", __func__, hoststr, host, port); |
| 104 | return -1; |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | int |
| 109 | main(int argc, const char *argv[]) |
no test coverage detected