mirror of https://github.com/getdnsapi/getdns.git
Merge branch 'develop' of github.com:verisign/getdns into develop
This commit is contained in:
commit
6289e2cad9
|
@ -159,7 +159,7 @@ static getdns_return_t set_os_defaults(getdns_context_t context) {
|
|||
context->suffix = create_from_ldns_list(rdf_list, rdf_list_sz);
|
||||
}
|
||||
/** cleanup **/
|
||||
ldns_resolver_free(lr);
|
||||
ldns_resolver_deep_free(lr);
|
||||
return GETDNS_RETURN_GOOD;
|
||||
}
|
||||
|
||||
|
|
|
@ -33,13 +33,10 @@
|
|||
#include <getdns/getdns.h>
|
||||
|
||||
static void print_response(getdns_dict* response) {
|
||||
getdns_bindata* bindata = NULL;
|
||||
getdns_dict_get_bindata(response, "pkt", &bindata);
|
||||
if (bindata) {
|
||||
char* data = (char*) bindata->data;
|
||||
data[bindata->size] = 0;
|
||||
memcpy(data, bindata->data, bindata->size);
|
||||
fprintf(stdout, "The packet %s\n", data);
|
||||
char *dict_str = getdns_pretty_print_dict(response);
|
||||
if (dict_str) {
|
||||
fprintf(stdout, "The packet %s\n", dict_str);
|
||||
free(dict_str);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue