[dovecot-cvs]
dovecot/src/imap cmd-append.c,1.29,1.30 cmd-sort.c,1.12,1.13
imap-fetch-body-section.c,1.17,1.18 imap-fetch.c,1.12,1.13
imap-sort.c,1.6,1.7 imap-thread.c,1.4,1.5
cras at procontrol.fi
cras at procontrol.fi
Sun Sep 21 20:21:39 EEST 2003
Update of /home/cvs/dovecot/src/imap
In directory danu:/tmp/cvs-serv17131/imap
Modified Files:
cmd-append.c cmd-sort.c imap-fetch-body-section.c imap-fetch.c
imap-sort.c imap-thread.c
Log Message:
data_stack_pool split into two: unsafe_data_stack_pool which works like
before, and a new one which verifies that stack frame stays the same
whenever the pool is accessed.
Index: cmd-append.c
===================================================================
RCS file: /home/cvs/dovecot/src/imap/cmd-append.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- cmd-append.c 27 Jul 2003 04:48:32 -0000 1.29
+++ cmd-append.c 21 Sep 2003 16:21:36 -0000 1.30
@@ -84,7 +84,7 @@
return TRUE;
}
memset(&old_flags, 0, sizeof(old_flags));
- old_flags.pool = data_stack_pool;
+ old_flags.pool = pool_datastack_create();
client_save_custom_flags(&old_flags, status.custom_flags,
status.custom_flags_count);
Index: cmd-sort.c
===================================================================
RCS file: /home/cvs/dovecot/src/imap/cmd-sort.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- cmd-sort.c 27 Jul 2003 04:48:32 -0000 1.12
+++ cmd-sort.c 21 Sep 2003 16:21:36 -0000 1.13
@@ -37,7 +37,7 @@
return NULL;
}
- buf = buffer_create_dynamic(data_stack_pool,
+ buf = buffer_create_dynamic(pool_datastack_create(),
32 * sizeof(enum mail_sort_type),
(size_t)-1);
Index: imap-fetch-body-section.c
===================================================================
RCS file: /home/cvs/dovecot/src/imap/imap-fetch-body-section.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- imap-fetch-body-section.c 21 Sep 2003 16:14:38 -0000 1.17
+++ imap-fetch-body-section.c 21 Sep 2003 16:21:36 -0000 1.18
@@ -339,7 +339,7 @@
i_assert(hdr_ctx.dest_size <= size->virtual_size);
} else {
hdr_ctx.dest =
- buffer_create_dynamic(data_stack_pool,
+ buffer_create_dynamic(pool_datastack_create(),
I_MIN(size->virtual_size, 8192),
(size_t)-1);
if (!fetch_header_fields(input, header_section, &hdr_ctx))
Index: imap-fetch.c
===================================================================
RCS file: /home/cvs/dovecot/src/imap/imap-fetch.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- imap-fetch.c 8 Sep 2003 13:04:34 -0000 1.12
+++ imap-fetch.c 21 Sep 2003 16:21:36 -0000 1.13
@@ -365,7 +365,7 @@
separately rather than parsing the full header so mail storage
can try to cache them. */
ctx.body_fetch_from_cache = TRUE;
- buffer = buffer_create_dynamic(data_stack_pool, 64, (size_t)-1);
+ buffer = buffer_create_dynamic(pool_datastack_create(), 64, (size_t)-1);
for (body = bodies; body != NULL; body = body->next) {
if (strncmp(body->section, "HEADER.FIELDS ", 14) != 0) {
ctx.body_fetch_from_cache = FALSE;
Index: imap-sort.c
===================================================================
RCS file: /home/cvs/dovecot/src/imap/imap-sort.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- imap-sort.c 13 Aug 2003 22:24:32 -0000 1.6
+++ imap-sort.c 21 Sep 2003 16:21:36 -0000 1.7
@@ -203,7 +203,8 @@
ctx = t_new(struct sort_context, 1);
/* normalize sorting program */
- buf = buffer_create_data(data_stack_pool, norm_prog, sizeof(norm_prog));
+ buf = buffer_create_data(pool_datastack_create(),
+ norm_prog, sizeof(norm_prog));
mail_sort_normalize(sort_program, buf);
memcpy(ctx->sort_program, norm_prog, sizeof(ctx->sort_program));
@@ -284,7 +285,7 @@
if (str == NULL)
return NULL;
- addr = message_address_parse(data_stack_pool,
+ addr = message_address_parse(pool_datastack_create(),
(const unsigned char *) str,
(size_t)-1, 1);
return addr != NULL ? addr->mailbox : NULL;
Index: imap-thread.c
===================================================================
RCS file: /home/cvs/dovecot/src/imap/imap-thread.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- imap-thread.c 6 Aug 2003 20:15:30 -0000 1.4
+++ imap-thread.c 21 Sep 2003 16:21:36 -0000 1.5
@@ -298,7 +298,8 @@
if (found_at) {
char *s;
- s = p_strdup_until(data_stack_pool, msgid, p);
+ s = p_strdup_until(unsafe_data_stack_pool,
+ msgid, p);
strip_lwsp(s);
return s;
}
@@ -623,7 +624,7 @@
if (subject == NULL)
return;
- subject = imap_get_base_subject_cased(data_stack_pool, subject,
+ subject = imap_get_base_subject_cased(pool_datastack_create(), subject,
&is_reply_or_forward);
if (*subject == '\0')
return;
More information about the dovecot-cvs
mailing list