Skip to content

Commit

Permalink
Merge pull request #1007 from Daxtorim/fix/query-types-chart-legend
Browse files Browse the repository at this point in the history
Added missing NS query type to getQueryTypes()
  • Loading branch information
DL6ER authored Dec 28, 2020
2 parents 1fce44e + d1e849e commit 5f60ba9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/api/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -620,11 +620,11 @@ void getQueryTypes(const int *sock)
ssend(*sock, "A (IPv4): %.2f\nAAAA (IPv6): %.2f\nANY: %.2f\nSRV: %.2f\n"
"SOA: %.2f\nPTR: %.2f\nTXT: %.2f\nNAPTR: %.2f\n"
"MX: %.2f\nDS: %.2f\nRRSIG: %.2f\nDNSKEY: %.2f\n"
"OTHER: %.2f\n",
"NS: %.2f\n" "OTHER: %.2f\n",
percentage[TYPE_A], percentage[TYPE_AAAA], percentage[TYPE_ANY], percentage[TYPE_SRV],
percentage[TYPE_SOA], percentage[TYPE_PTR], percentage[TYPE_TXT], percentage[TYPE_NAPTR],
percentage[TYPE_MX], percentage[TYPE_DS], percentage[TYPE_RRSIG], percentage[TYPE_DNSKEY],
percentage[TYPE_OTHER]);
percentage[TYPE_NS], percentage[TYPE_OTHER]);
}
else {
pack_str32(*sock, "A (IPv4)");
Expand All @@ -651,6 +651,8 @@ void getQueryTypes(const int *sock)
pack_float(*sock, percentage[TYPE_RRSIG]);
pack_str32(*sock, "DNSKEY");
pack_float(*sock, percentage[TYPE_DNSKEY]);
pack_str32(*sock, "NS");
pack_float(*sock, percentage[TYPE_NS]);
pack_str32(*sock, "OTHER");
pack_float(*sock, percentage[TYPE_OTHER]);
}
Expand Down
5 changes: 3 additions & 2 deletions test/test_suite.bats
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,9 @@
[[ ${lines[10]} == "DS: 0.00" ]]
[[ ${lines[11]} == "RRSIG: 0.00" ]]
[[ ${lines[12]} == "DNSKEY: 0.00" ]]
[[ ${lines[13]} == "OTHER: 0.00" ]]
[[ ${lines[14]} == "" ]]
[[ ${lines[13]} == "NS: 0.00" ]]
[[ ${lines[14]} == "OTHER: 0.00" ]]
[[ ${lines[15]} == "" ]]
}

# Here and below: Acknowledge that there might be a host name after
Expand Down

0 comments on commit 5f60ba9

Please sign in to comment.