]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
When printing KEY records with COMMENT and MULTILINE, the line would often
authorBrian Wellington <source@isc.org>
Wed, 28 Mar 2001 02:57:26 +0000 (02:57 +0000)
committerBrian Wellington <source@isc.org>
Wed, 28 Mar 2001 02:57:26 +0000 (02:57 +0000)
be too long.

lib/dns/rdata/generic/key_25.c

index 2df2250eb6052deff838bd0d6f255978bf02b180..e5913cc830e8dd00413d4f677eb28e6fe6242aec 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: key_25.c,v 1.38 2001/03/16 22:52:42 bwelling Exp $ */
+/* $Id: key_25.c,v 1.39 2001/03/28 02:57:26 bwelling Exp $ */
 
 /*
  * Reviewed: Wed Mar 15 16:47:10 PST 2000 by halley.
@@ -110,8 +110,14 @@ totext_key(ARGS_TOTEXT) {
        RETERR(str_totext(tctx->linebreak, target));
        RETERR(isc_base64_totext(&sr, tctx->width - 2,
                                 tctx->linebreak, target));
+
+       if ((tctx->flags & DNS_STYLEFLAG_COMMENT) != 0)
+               RETERR(str_totext(tctx->linebreak, target));
+       else if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0)
+               RETERR(str_totext(" ", target));
+
        if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0)
-               RETERR(str_totext(" )", target));
+               RETERR(str_totext(")", target));
 
        if ((tctx->flags & DNS_STYLEFLAG_COMMENT) != 0) {
                isc_region_t tmpr;