]> diplodocus.org Git - nmh/commitdiff
mhlist -verbose: Don't duplicate message/external-body's parameters.
authorRalph Corderoy <ralph@inputplus.co.uk>
Thu, 24 Aug 2017 15:03:44 +0000 (16:03 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Thu, 24 Aug 2017 15:03:44 +0000 (16:03 +0100)
The test of eb_flags remains, and since the old code used to insist
eb_access, `access-type', was set, the new code adds a note if it's
missing.

test/mhlist/test-ext-params
uip/mhlistsbr.c

index fb64d41..575f473 100755 (executable)
@@ -164,16 +164,12 @@ run_test 'mhlist last -noheader -verbose -disposition' \
      2     message/external-body      118
             access-type="url"
             url="http://www.kremvax.ru/this/is/an/example/of/a/very/long/url/that/should-be-wrapped/image.jpeg"
      2     message/external-body      118
             access-type="url"
             url="http://www.kremvax.ru/this/is/an/example/of/a/very/long/url/that/should-be-wrapped/image.jpeg"
-            url="http://www.kremvax.ru/this/is/an/example/of/a/very/long/url/that/should-be-wrapped/image.jpeg"
-            access-type="url"
            image/jpeg                     Test of a long URL
             disposition "attachment"
               filename="image.jpeg"
      3     message/external-body      118
             access-type="url"
             url="http://www.kremvax.ru/this/is/an/example/of/a/very/long/url          /that/should-be-wrapped/image.jpeg"
            image/jpeg                     Test of a long URL
             disposition "attachment"
               filename="image.jpeg"
      3     message/external-body      118
             access-type="url"
             url="http://www.kremvax.ru/this/is/an/example/of/a/very/long/url          /that/should-be-wrapped/image.jpeg"
-            url="http://www.kremvax.ru/this/is/an/example/of/a/very/long/url/that/should-be-wrapped/image.jpeg"
-            access-type="url"
            image/jpeg                     Test of a long URL
             disposition "attachment"
               filename="image.jpeg"'
            image/jpeg                     Test of a long URL
             disposition "attachment"
               filename="image.jpeg"'
index 461de6d..cda4e48 100644 (file)
@@ -378,30 +378,10 @@ list_external (CT ct, int toplevel, int realsize, int verbose, int debug,
     list_content (ct, toplevel, realsize, verbose, debug, dispo);
 
     if (verbose) {
     list_content (ct, toplevel, realsize, verbose, debug, dispo);
 
     if (verbose) {
-       if (e->eb_name)
-           printf ("\t     name=\"%s\"\n", e->eb_name);
-       if (e->eb_dir)
-           printf ("\t     directory=\"%s\"\n", e->eb_dir);
-       if (e->eb_site)
-           printf ("\t     site=\"%s\"\n", e->eb_site);
-       if (e->eb_server)
-           printf ("\t     server=\"%s\"\n", e->eb_server);
-       if (e->eb_subject)
-           printf ("\t     subject=\"%s\"\n", e->eb_subject);
-       if (e->eb_url)
-           printf ("\t     url=\"%s\"\n", e->eb_url);
-
-       /* This must be defined */
-       printf     ("\t     access-type=\"%s\"\n", e->eb_access);
-
-       if (e->eb_mode)
-           printf ("\t     mode=\"%s\"\n", e->eb_mode);
-       if (e->eb_permission)
-           printf ("\t     permission=\"%s\"\n", e->eb_permission);
-
+        if (!e->eb_access)
+            puts("\t     [missing access-type]"); /* Must be defined. */
        if (e->eb_flags == NOTOK)
            puts("\t     [service unavailable]");
        if (e->eb_flags == NOTOK)
            puts("\t     [service unavailable]");
-
     }
 
     /*
     }
 
     /*