[gmime] Renamed INVALID_ADDRESS_SPEC to INVALID_ADDRESS_LIST



commit 76803415b82e62dbccdc26abbd06a1517d11b4f2
Author: Jeffrey Stedfast <jestedfa microsoft com>
Date:   Mon Jan 28 15:54:24 2019 -0500

    Renamed INVALID_ADDRESS_SPEC to INVALID_ADDRESS_LIST

 examples/msgcheck.c          | 4 ++--
 gmime/gmime-parser-options.h | 4 ++--
 gmime/internet-address.c     | 8 +++++---
 tests/test-parser.c          | 2 +-
 4 files changed, 10 insertions(+), 8 deletions(-)
---
diff --git a/examples/msgcheck.c b/examples/msgcheck.c
index 2f78a616..b5ac733e 100644
--- a/examples/msgcheck.c
+++ b/examples/msgcheck.c
@@ -52,8 +52,8 @@ errcode2str(GMimeParserWarning errcode)
                return "truncated message";
        case GMIME_WARN_MALFORMED_MESSAGE:
                return "malformed message";
-       case GMIME_WARN_INVALID_ADDRESS_SPEC:
-               return "invalid address specification";
+       case GMIME_WARN_INVALID_ADDRESS_LIST:
+               return "invalid address list";
        case GMIME_CRIT_INVALID_HEADER_NAME:
                return "invalid header name, parser may skip the message or parts of it";
        case GMIME_CRIT_CONFLICTING_HEADER:
diff --git a/gmime/gmime-parser-options.h b/gmime/gmime-parser-options.h
index 2c17b798..af7f93d1 100644
--- a/gmime/gmime-parser-options.h
+++ b/gmime/gmime-parser-options.h
@@ -52,7 +52,7 @@ typedef enum {
  * @GMIME_WARN_MALFORMED_MULTIPART: no items in a `multipart/...`
  * @GMIME_WARN_TRUNCATED_MESSAGE: the message is truncated
  * @GMIME_WARN_MALFORMED_MESSAGE: the message is malformed
- * @GMIME_WARN_INVALID_ADDRESS_SPEC: invalid address specification
+ * @GMIME_WARN_INVALID_ADDRESS_LIST: invalid address list
  * @GMIME_CRIT_INVALID_HEADER_NAME: invalid header name, the parser may skip the message or parts of it
  * @GMIME_CRIT_CONFLICTING_HEADER: conflicting header
  * @GMIME_CRIT_CONFLICTING_PARAMETER: conflicting header parameter
@@ -75,7 +75,7 @@ typedef enum {
        GMIME_CRIT_CONFLICTING_PARAMETER,
        GMIME_CRIT_MULTIPART_WITHOUT_BOUNDARY,
        GMIME_WARN_INVALID_PARAMETER,
-       GMIME_WARN_INVALID_ADDRESS_SPEC
+       GMIME_WARN_INVALID_ADDRESS_LIST
 } GMimeParserWarning;
 
 /**
diff --git a/gmime/internet-address.c b/gmime/internet-address.c
index b899d471..f59b38b6 100644
--- a/gmime/internet-address.c
+++ b/gmime/internet-address.c
@@ -2051,7 +2051,8 @@ address_parse (GMimeParserOptions *options, AddressParserFlags flags, const char
        
  error:
        if (g_mime_parser_options_get_warning_callback (options) != NULL)
-               _g_mime_parser_options_warn (options, offset, GMIME_WARN_INVALID_ADDRESS_SPEC, *in);
+               _g_mime_parser_options_warn (options, offset, GMIME_WARN_INVALID_ADDRESS_LIST, *in);
+       
        *address = NULL;
        *in = inptr;
        
@@ -2110,8 +2111,9 @@ address_list_parse (InternetAddressList *list, GMimeParserOptions *options, cons
                        separator_between_addrs = TRUE;
                        inptr++;
                } while (TRUE);
-               if (can_warn && !(separator_between_addrs || (*inptr == '\0') || (is_group && (*inptr == 
';'))))
-                       _g_mime_parser_options_warn (options, offset, GMIME_WARN_INVALID_ADDRESS_SPEC, *in);
+               
+               if (can_warn && !(separator_between_addrs || (*inptr == '\0') || (is_group && *inptr == ';')))
+                       _g_mime_parser_options_warn (options, offset, GMIME_WARN_INVALID_ADDRESS_LIST, *in);
        }
        
        *in = inptr;
diff --git a/tests/test-parser.c b/tests/test-parser.c
index 21e9ceb5..43fa1870 100644
--- a/tests/test-parser.c
+++ b/tests/test-parser.c
@@ -41,7 +41,7 @@
 #define TEST_PRESERVE_HEADERS
 //#define PRINT_MIME_STRUCT
 #define PRINT_MIME_STRUCT_ITER
-//#define TEST_WRITE_TO_STREAM
+#define TEST_WRITE_TO_STREAM
 
 #ifdef PRINT_MIME_STRUCT
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]