mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-12 16:50:00 -04:00
always check 'printcmd' before printing cmdline message
(cherry picked from commit 6d50f7d924)
This commit is contained in:
parent
cb0140bdda
commit
4caffaaad2
1 changed files with 3 additions and 2 deletions
|
|
@ -502,8 +502,9 @@ printmessage(dig_query_t *query, dns_message_t *msg, bool headers) {
|
|||
check_result(result, "dns_master_stylecreate");
|
||||
|
||||
if (query->lookup->cmdline[0] != 0) {
|
||||
if (!short_form)
|
||||
if (!short_form && printcmd) {
|
||||
fputs(query->lookup->cmdline, stdout);
|
||||
}
|
||||
query->lookup->cmdline[0]=0;
|
||||
}
|
||||
debug("printmessage(%s %s %s)", headers ? "headers" : "noheaders",
|
||||
|
|
@ -526,7 +527,7 @@ printmessage(dig_query_t *query, dns_message_t *msg, bool headers) {
|
|||
check_result(result, "isc_buffer_allocate");
|
||||
|
||||
if (query->lookup->comments && !short_form) {
|
||||
if (query->lookup->cmdline[0] != 0)
|
||||
if (query->lookup->cmdline[0] != 0 && printcmd)
|
||||
printf("; %s\n", query->lookup->cmdline);
|
||||
if (msg == query->lookup->sendmsg)
|
||||
printf(";; Sending:\n");
|
||||
|
|
|
|||
Loading…
Reference in a new issue