MCPcopy Create free account
hub / github.com/acl-dev/acl / test

Function test

lib_acl/samples/resolve/main.cpp:109–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107}
108
109static void test(const char *name, int use_acl)
110{
111 ACL_DNS_DB *res = NULL;
112
113 if (use_acl) {
114 printf("acl_gethostbyname name: %s\n", name);
115 res = acl_gethostbyname(name, NULL);
116 if (res == NULL) {
117 printf("acl_gethostbyname %s error\n", name);
118 return;
119 }
120 }
121#if !defined(MACOSX) && !defined(ACL_SUNOS5) && !defined(MINGW)
122 else {
123 res = resolve_name(name);
124 }
125#endif
126
127 if (res) {
128 show(res);
129 acl_netdb_free(res);
130 }
131
132 printf("-------------------------------------------------------\r\n");
133
134 res = resolve_addr(name);
135 if (res) {
136 show(res);
137 acl_netdb_free(res);
138 }
139}
140
141static void usage(const char *procname)
142{

Callers 1

mainFunction · 0.70

Calls 5

acl_gethostbynameFunction · 0.85
resolve_nameFunction · 0.85
acl_netdb_freeFunction · 0.85
showFunction · 0.70
resolve_addrFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…