mirror of https://github.com/getdnsapi/getdns.git
Fixes from testing on different platforms
This commit is contained in:
parent
9b97eb9361
commit
08c0c4d6e4
|
@ -729,8 +729,7 @@ static getdns_return_t
|
|||
set_os_defaults_windows(struct getdns_context *context)
|
||||
{
|
||||
char domain[1024] = "";
|
||||
size_t upstreams_limit = 10, length;
|
||||
struct getdns_bindata bindata;
|
||||
size_t upstreams_limit = 10;
|
||||
struct addrinfo hints;
|
||||
struct addrinfo *result;
|
||||
getdns_upstream *upstream;
|
||||
|
|
|
@ -428,13 +428,6 @@ inline static void debug_sec_print_dname(const char *msg, const uint8_t *label)
|
|||
else
|
||||
DEBUG_SEC("%s<nil>\n", msg);
|
||||
}
|
||||
inline static void debug_sec_print_pkt(
|
||||
const char *msg, uint8_t *pkt, size_t pkt_len)
|
||||
{
|
||||
char *str;
|
||||
DEBUG_SEC("%s%s\n", msg, (str = gldns_wire2str_pkt(pkt, pkt_len)));
|
||||
if (str) free(str);
|
||||
}
|
||||
#else
|
||||
#define debug_sec_print_rr(...) DEBUG_OFF(__VA_ARGS__)
|
||||
#define debug_sec_print_dname(...) DEBUG_OFF(__VA_ARGS__)
|
||||
|
|
|
@ -750,7 +750,7 @@ getdns_return_t parse_args(int argc, char **argv)
|
|||
"specify_class", GETDNS_RRCLASS_ANY);
|
||||
else if (strncasecmp(arg+15, "CLASS", 5) == 0) {
|
||||
klass = strtol(arg + 20, &endptr, 10);
|
||||
if (*endptr || klass < 0 || klass > 255)
|
||||
if (*endptr || klass > 255)
|
||||
fprintf(stderr,
|
||||
"Unknown class: %s\n",
|
||||
arg+15);
|
||||
|
@ -1114,11 +1114,11 @@ next: ;
|
|||
/* apply the accumulated pubkey pinset to all upstreams: */
|
||||
for (i = 0; i < upstream_count; i++) {
|
||||
if (r = getdns_list_get_dict(upstream_list, i, &upstream), r) {
|
||||
fprintf(stderr, "Failed to get upstream %lu when adding pinset\n", i);
|
||||
fprintf(stderr, "Failed to get upstream %lu when adding pinset\n", (long unsigned int)i);
|
||||
return r;
|
||||
}
|
||||
if (r = getdns_dict_set_list(upstream, "tls_pubkey_pinset", pubkey_pinset), r) {
|
||||
fprintf(stderr, "Failed to set pubkey pinset on upstream %lu\n", i);
|
||||
fprintf(stderr, "Failed to set pubkey pinset on upstream %lu\n", (long unsigned int)i);
|
||||
return r;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue