chiark / gitweb /
merge extra MIME parsing
authorRichard Kettlewell <rjk@greenend.org.uk>
Tue, 18 Dec 2007 10:40:52 +0000 (10:40 +0000)
committerRichard Kettlewell <rjk@greenend.org.uk>
Tue, 18 Dec 2007 10:40:52 +0000 (10:40 +0000)
1  2 
lib/mime.c
lib/test.c

diff --cc lib/mime.c
index 03aa94b9a03b3b3b2040aca4f7a1d78ca7999286,c8ffe3192e922f634fb4a9ad41e55e84b9f99175..5562c7e5b8976d805cc76c5265335b2e42cf1d6a
@@@ -224,9 -304,16 +306,16 @@@ static int isfinal(const char *ptr, con
          && !strncmp(ptr + 2, boundary, bl)
          && ptr[bl + 2] == '-'
          && ptr[bl + 3] == '-'
 -        && iscrlf(ptr + bl + 4));
 +        && (iscrlf(ptr + bl + 4) || *(ptr + bl + 4) == 0));
  }
  
+ /** @brief Parse a multipart MIME body
+  * @param s Start of message
+  * @param callback CAllback for each part
+  * @param boundary Boundary string
+  * @param u Passed to callback
+  * @return 0 on success, non-0 on error
+  */
  int mime_multipart(const char *s,
                   int (*callback)(const char *s, void *u),
                   const char *boundary,
diff --cc lib/test.c
Simple merge