MCPcopy Create free account
hub / github.com/Hamlib/Hamlib / test_host

Function test_host

tests/testnet.c:76–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76static 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
108int
109main(int argc, const char *argv[])

Callers 1

mainFunction · 0.85

Calls 2

parse_hoststrFunction · 0.85
rig_network_addrFunction · 0.85

Tested by

no test coverage detected