Skip to content
Snippets Groups Projects
Commit c5f7bf68 authored by Jan Kadlec's avatar Jan Kadlec
Browse files

Fixed small error.

Refs #9
parent 4cd779aa
No related branches found
No related tags found
No related merge requests found
......@@ -246,63 +246,4 @@ int dnslib_zone_dump_binary(dnslib_zone_t *zone, const char *filename)
return 0;
}
/*
void dnslib_rdata_dump(dnslib_rdata_t *rdata, uint32_t type)
{
printf("------- RDATA -------\n");
if (rdata == NULL) {
printf("There are no rdata in this RRset!\n");
printf("------- RDATA -------\n");
return;
}
dnslib_rrtype_descriptor_t *desc = dnslib_rrtype_descriptor_by_type(type);
assert(desc != NULL);
for (int i = 0; i < desc->length; i++) {
if (&(rdata->items[i]) == NULL) { //XXX isn't this itself enough to crash?
printf("Item n. %d is not set!\n", i);
continue;
}
if (desc->wireformat[i] == DNSLIB_RDATA_WF_COMPRESSED_DNAME ||
desc->wireformat[i] == DNSLIB_RDATA_WF_UNCOMPRESSED_DNAME ||
desc->wireformat[i] == DNSLIB_RDATA_WF_LITERAL_DNAME ) {
assert(rdata->items[i].dname != NULL);
printf("%d: %s\n",
i, dnslib_dname_to_str(rdata->items[i].dname));
} else {
assert(rdata->items[i].raw_data != NULL);
printf("%d: raw_data: length: %d\n", i,
*(rdata->items[i].raw_data));
}
}
printf("------- RDATA -------\n");
}
void dnslib_rrsig_dump(dnslib_rrsig_set_t *rrsig)
{
printf("------- RRSIG -------\n");
if (rrsig == NULL) {
printf("RRSIG is not set\n");
printf("------- RRSIG -------\n");
return;
}
printf("type: %s\n", dnslib_rrtype_to_string(rrsig->type));
printf("class: %d\n", rrsig->rclass);
printf("ttl: %d\n", rrsig->ttl);
dnslib_rdata_t *tmp = rrsig->rdata;
if (tmp == NULL) {
return;
}
while (tmp->next != rrsig->rdata) {
dnslib_rdata_dump(tmp, DNSLIB_RRTYPE_RRSIG);
tmp = tmp->next;
}
dnslib_rdata_dump(tmp, DNSLIB_RRTYPE_RRSIG);
printf("------- RRSIG -------\n");
}*/
/* end of file zone-dump.c */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment