From d89f072f8d45dd65ad62188a9e8b5f903ea2faf5 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Tue, 9 Apr 2002 13:45:44 +0000 Subject: If we get multiple Content-Type header values, change subsequent headers 2002-04-09 Not Zed * camel-mime-part.c (construct_from_parser): If we get multiple Content-Type header values, change subsequent headers to X-Invalid-Content-Type so it doesn't wreck processing. This fixes the reported case in #18929, but i dont know if it fixes the original posters problems. 2002-04-08 Not Zed * camel-vtrash-folder.c (vtrash_move_messages_to): If we find we're moving from the vtrash to another folder, we need to convert the uid from a vfolder uid to the source uid (+8). Fix for #20886. Also changed to batch multiple moves to different folders so they are done as efficiently as possible rather than one at a time. * camel-mime-utils.c (base64_decode_step): If we only get passed '=', we back track only if we actually output any data. Fix for #21716. (quoted_decode): Pass out size_t instead of int, and use 0 instead of -1 for error since its not signed. This will fix similar bug to above in different circumstances since the result is taken as unsigned. This is only an internal func. (quoted_encode): Return size_t just for consistency. * camel-block-file.c (block_file_validate_root): Comment out the debug and move it into a warning when the validation fails. svn path=/trunk/; revision=16394 --- camel/camel-block-file.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'camel/camel-block-file.c') diff --git a/camel/camel-block-file.c b/camel/camel-block-file.c index 6b889f9da1..34e62a7c8a 100644 --- a/camel/camel-block-file.c +++ b/camel/camel-block-file.c @@ -98,22 +98,15 @@ block_file_validate_root(CamelBlockFile *bs) fstat(bs->fd, &st); - (printf("Validate root: '%s'\n", bs->path)); - (printf("version: %.8s (%.8s)\n", bs->root->version, bs->version)); - (printf("block size: %d (%d)%s\n", br->block_size, bs->block_size, + d(printf("Validate root: '%s'\n", bs->path)); + d(printf("version: %.8s (%.8s)\n", bs->root->version, bs->version)); + d(printf("block size: %d (%d)%s\n", br->block_size, bs->block_size, br->block_size != bs->block_size ? " BAD":" OK")); - (printf("free: %ld (%d add size < %ld)%s\n", (long)br->free, br->free / bs->block_size * bs->block_size, (long)st.st_size, + d(printf("free: %ld (%d add size < %ld)%s\n", (long)br->free, br->free / bs->block_size * bs->block_size, (long)st.st_size, (br->free > st.st_size) || (br->free % bs->block_size) != 0 ? " BAD":" OK")); - (printf("last: %ld (%d and size: %ld)%s\n", (long)br->last, br->last / bs->block_size * bs->block_size, (long)st.st_size, + d(printf("last: %ld (%d and size: %ld)%s\n", (long)br->last, br->last / bs->block_size * bs->block_size, (long)st.st_size, (br->last != st.st_size) || ((br->last % bs->block_size) != 0) ? " BAD": " OK")); - (printf("flags: %s\n", (br->flags & CAMEL_BLOCK_FILE_SYNC)?"SYNC":"unSYNC")); - - printf("last = %ld, size = %ld\n", (unsigned long)br->last, (unsigned long)st.st_size); - - if (br->last != st.st_size) - printf("last != size!\n"); - else - printf("last == size?\n"); + d(printf("flags: %s\n", (br->flags & CAMEL_BLOCK_FILE_SYNC)?"SYNC":"unSYNC")); if (br->last == 0 || memcmp(bs->root->version, bs->version, 8) != 0 @@ -124,6 +117,15 @@ block_file_validate_root(CamelBlockFile *bs) || st.st_size != br->last || br->free > st.st_size || (br->flags & CAMEL_BLOCK_FILE_SYNC) == 0) { + g_warning("Invalid root: '%s'\n", bs->path); + g_warning("version: %.8s (%.8s)\n", bs->root->version, bs->version); + g_warning("block size: %d (%d)%s\n", br->block_size, bs->block_size, + br->block_size != bs->block_size ? " BAD":" OK"); + g_warning("free: %ld (%d add size < %ld)%s\n", (long)br->free, br->free / bs->block_size * bs->block_size, (long)st.st_size, + (br->free > st.st_size) || (br->free % bs->block_size) != 0 ? " BAD":" OK"); + g_warning("last: %ld (%d and size: %ld)%s\n", (long)br->last, br->last / bs->block_size * bs->block_size, (long)st.st_size, + (br->last != st.st_size) || ((br->last % bs->block_size) != 0) ? " BAD": " OK"); + g_warning("flags: %s\n", (br->flags & CAMEL_BLOCK_FILE_SYNC)?"SYNC":"unSYNC"); return -1; } -- cgit v1.2.3