mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-11 12:20:00 -04:00
minor bugfix in mdig: when using +multi, +norrcomments was ignored
(cherry picked from commit edab51b420)
This commit is contained in:
parent
13f4c3b54d
commit
c2a128587c
1 changed files with 9 additions and 6 deletions
|
|
@ -96,7 +96,7 @@ static bool besteffort = true;
|
|||
static bool display_short_form = false;
|
||||
static bool display_headers = true;
|
||||
static bool display_comments = true;
|
||||
static bool display_rrcomments = true;
|
||||
static int display_rrcomments = 0;
|
||||
static bool display_ttlunits = true;
|
||||
static bool display_ttl = true;
|
||||
static bool display_class = true;
|
||||
|
|
@ -249,7 +249,7 @@ recvresponse(isc_task_t *task, isc_event_t *event) {
|
|||
styleflags |= DNS_STYLEFLAG_COMMENT;
|
||||
if (display_unknown_format)
|
||||
styleflags |= DNS_STYLEFLAG_UNKNOWNFORMAT;
|
||||
if (display_rrcomments)
|
||||
if (display_rrcomments > 0)
|
||||
styleflags |= DNS_STYLEFLAG_RRCOMMENT;
|
||||
if (display_ttlunits)
|
||||
styleflags |= DNS_STYLEFLAG_TTL_UNITS;
|
||||
|
|
@ -267,7 +267,10 @@ recvresponse(isc_task_t *task, isc_event_t *event) {
|
|||
styleflags |= DNS_STYLEFLAG_TTL;
|
||||
styleflags |= DNS_STYLEFLAG_MULTILINE;
|
||||
styleflags |= DNS_STYLEFLAG_COMMENT;
|
||||
styleflags |= DNS_STYLEFLAG_RRCOMMENT;
|
||||
/* Turn on rrcomments unless explicitly disabled */
|
||||
if (display_rrcomments >= 0) {
|
||||
styleflags |= DNS_STYLEFLAG_RRCOMMENT;
|
||||
}
|
||||
}
|
||||
if (display_multiline || (!display_ttl && !display_class))
|
||||
result = dns_master_stylecreate(&style, styleflags,
|
||||
|
|
@ -1109,7 +1112,7 @@ plus_option(char *option, struct query *query, bool global)
|
|||
display_authority = state;
|
||||
display_additional = state;
|
||||
display_comments = state;
|
||||
display_rrcomments = state;
|
||||
display_rrcomments = state ? 1 : -1;
|
||||
break;
|
||||
case 'n': /* answer */
|
||||
FULLCHECK("answer");
|
||||
|
|
@ -1358,7 +1361,7 @@ plus_option(char *option, struct query *query, bool global)
|
|||
case 'r':
|
||||
FULLCHECK("rrcomments");
|
||||
GLOBAL();
|
||||
display_rrcomments = state;
|
||||
display_rrcomments = state ? 1 : -1;
|
||||
break;
|
||||
default:
|
||||
goto invalid_option;
|
||||
|
|
@ -1376,7 +1379,7 @@ plus_option(char *option, struct query *query, bool global)
|
|||
display_authority = false;
|
||||
display_additional = false;
|
||||
display_comments = false;
|
||||
display_rrcomments = false;
|
||||
display_rrcomments = -1;
|
||||
}
|
||||
break;
|
||||
case 'p': /* split */
|
||||
|
|
|
|||
Loading…
Reference in a new issue