[dovecot-cvs] dovecot/src/lib-mail message-part-serialize.c, 1.20,
1.21 message-part-serialize.h, 1.10, 1.11
cras at dovecot.org
cras at dovecot.org
Fri Sep 10 14:45:23 EEST 2004
Update of /var/lib/cvs/dovecot/src/lib-mail
In directory talvi:/tmp/cvs-serv508/lib-mail
Modified Files:
message-part-serialize.c message-part-serialize.h
Log Message:
Removed all "unreliable headers" handling code. With mbox we actually handle
only virtual header sizes everywhere.
Index: message-part-serialize.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-mail/message-part-serialize.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- message-part-serialize.c 10 Sep 2004 11:25:33 -0000 1.20
+++ message-part-serialize.c 10 Sep 2004 11:45:21 -0000 1.21
@@ -240,26 +240,12 @@
return TRUE;
}
-static void
-message_parts_update_physical_pos(struct message_part *parent, off_t diff)
-{
- struct message_part *part;
-
- for (part = parent->children; part != NULL; part = part->next) {
- part->physical_pos += diff;
- if (part->children != NULL)
- message_parts_update_physical_pos(part, diff);
- }
-}
-
struct message_part *
message_part_deserialize(pool_t pool, const void *data, size_t size,
- const struct message_size *new_hdr_size,
const char **error_r)
{
struct deserialize_context ctx;
struct message_part *part;
- off_t diff;
memset(&ctx, 0, sizeof(ctx));
ctx.pool = pool;
@@ -276,20 +262,5 @@
return NULL;
}
- if (new_hdr_size != NULL) {
- if (new_hdr_size->virtual_size !=
- part->header_size.virtual_size) {
- part->header_size.virtual_size =
- new_hdr_size->virtual_size;
- }
- if (new_hdr_size->physical_size !=
- part->header_size.physical_size) {
- diff = new_hdr_size->physical_size -
- part->header_size.physical_size;
- part->header_size.physical_size += diff;
- message_parts_update_physical_pos(part, diff);
- }
- }
-
return part;
}
Index: message-part-serialize.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-mail/message-part-serialize.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- message-part-serialize.h 10 Sep 2004 11:25:33 -0000 1.10
+++ message-part-serialize.h 10 Sep 2004 11:45:21 -0000 1.11
@@ -8,11 +8,9 @@
void message_part_serialize(struct message_part *part, buffer_t *dest);
/* Generate struct message_part from serialized data. Returns NULL and sets
- error if any problems are detected. If cache header size is unreliable
- (eg. with mbox), you can give a new header size which will be used. */
+ error if any problems are detected. */
struct message_part *
message_part_deserialize(pool_t pool, const void *data, size_t size,
- const struct message_size *new_hdr_size,
const char **error_r);
#endif
More information about the dovecot-cvs
mailing list