[dovecot-cvs] dovecot/src/lib-storage/index index-mail-headers.c, 1.69, 1.70 index-mail.c, 1.112, 1.113 index-mailbox-check.c, 1.14, 1.15 index-search.c, 1.120, 1.121
tss at dovecot.org
tss at dovecot.org
Fri Dec 15 18:38:24 UTC 2006
- Previous message: [dovecot-cvs] dovecot/src/lib-storage mail-storage.c, 1.66, 1.67 mail-storage.h, 1.121, 1.122
- Next message: [dovecot-cvs] dovecot/src/lib-storage/index/maildir maildir-copy.c, 1.47, 1.48 maildir-mail.c, 1.30, 1.31 maildir-sync.c, 1.86, 1.87
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/lib/cvs/dovecot/src/lib-storage/index
In directory talvi:/tmp/cvs-serv3614/lib-storage/index
Modified Files:
index-mail-headers.c index-mail.c index-mailbox-check.c
index-search.c
Log Message:
Replaced void *context from a lot of callbacks with the actual context
type. Also added/fixed some context type checks.
Index: index-mail-headers.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/index-mail-headers.c,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -d -r1.69 -r1.70
--- index-mail-headers.c 13 Oct 2006 15:33:05 -0000 1.69
+++ index-mail-headers.c 15 Dec 2006 18:38:19 -0000 1.70
@@ -327,18 +327,16 @@
static void
index_mail_parse_part_header_cb(struct message_part *part,
- struct message_header_line *hdr, void *context)
+ struct message_header_line *hdr,
+ struct index_mail *mail)
{
- struct index_mail *mail = context;
-
index_mail_parse_header(part, hdr, mail);
}
static void
-index_mail_parse_header_cb(struct message_header_line *hdr, void *context)
+index_mail_parse_header_cb(struct message_header_line *hdr,
+ struct index_mail *mail)
{
- struct index_mail *mail = context;
-
index_mail_parse_header(mail->data.parts, hdr, mail);
}
@@ -379,10 +377,9 @@
}
static void
-imap_envelope_parse_callback(struct message_header_line *hdr, void *context)
+imap_envelope_parse_callback(struct message_header_line *hdr,
+ struct index_mail *mail)
{
- struct index_mail *mail = context;
-
imap_envelope_parse_header(mail->data_pool,
&mail->data.envelope_data, hdr);
@@ -592,10 +589,8 @@
}
static void header_cache_callback(struct message_header_line *hdr,
- bool *matched, void *context)
+ bool *matched, struct index_mail *mail)
{
- struct index_mail *mail = context;
-
if (hdr != NULL && hdr->eoh)
*matched = FALSE;
Index: index-mail.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/index-mail.c,v
retrieving revision 1.112
retrieving revision 1.113
diff -u -d -r1.112 -r1.113
--- index-mail.c 15 Dec 2006 16:55:44 -0000 1.112
+++ index-mail.c 15 Dec 2006 18:38:19 -0000 1.113
@@ -366,10 +366,8 @@
static void parse_bodystructure_part_header(struct message_part *part,
struct message_header_line *hdr,
- void *context)
+ pool_t pool)
{
- pool_t pool = context;
-
imap_bodystructure_parse_header(pool, part, hdr);
}
Index: index-mailbox-check.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/index-mailbox-check.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- index-mailbox-check.c 14 Jan 2006 18:47:42 -0000 1.14
+++ index-mailbox-check.c 15 Dec 2006 18:38:20 -0000 1.15
@@ -21,9 +21,8 @@
struct io *io;
};
-static void check_timeout(void *context)
+static void check_timeout(struct index_mailbox *ibox)
{
- struct index_mailbox *ibox = context;
struct index_notify_file *file;
struct stat st;
time_t last_check;
@@ -53,10 +52,8 @@
}
}
-static void notify_callback(void *context)
+static void notify_callback(struct index_mailbox *ibox)
{
- struct index_mailbox *ibox = context;
-
ibox->notify_last_check = ioloop_time;
if ((unsigned int)(ioloop_time - ibox->notify_last_sent) >=
ibox->min_notify_interval) {
Index: index-search.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/index-search.c,v
retrieving revision 1.120
retrieving revision 1.121
diff -u -d -r1.120 -r1.121
--- index-search.c 8 Oct 2006 19:22:33 -0000 1.120
+++ index-search.c 15 Dec 2006 18:38:20 -0000 1.121
@@ -126,10 +126,9 @@
}
}
-static void search_init_seqset_arg(struct mail_search_arg *arg, void *context)
+static void search_init_seqset_arg(struct mail_search_arg *arg,
+ struct index_search_context *ctx)
{
- struct index_search_context *ctx = context;
-
switch (arg->type) {
case SEARCH_SEQSET:
ctx->have_seqsets = TRUE;
@@ -143,10 +142,9 @@
}
}
-static void search_seqset_arg(struct mail_search_arg *arg, void *context)
+static void search_seqset_arg(struct mail_search_arg *arg,
+ struct index_search_context *ctx)
{
- struct index_search_context *ctx = context;
-
if (arg->type == SEARCH_SEQSET) {
if (seqset_contains(arg->value.seqset, ctx->mail_ctx.seq))
ARG_SET_RESULT(arg, 1);
@@ -155,10 +153,9 @@
}
}
-static void search_index_arg(struct mail_search_arg *arg, void *context)
+static void search_index_arg(struct mail_search_arg *arg,
+ struct index_search_context *ctx)
{
- struct index_search_context *ctx = context;
-
if (ctx->imail->data.rec == NULL) {
/* expunged message */
ARG_SET_RESULT(arg, 0);
@@ -258,10 +255,9 @@
}
}
-static void search_cached_arg(struct mail_search_arg *arg, void *context)
+static void search_cached_arg(struct mail_search_arg *arg,
+ struct index_search_context *ctx)
{
- struct index_search_context *ctx = context;
-
switch (search_arg_match_cached(ctx, arg->type,
arg->value.str)) {
case -1:
@@ -335,9 +331,9 @@
return arg->context;
}
-static void search_header_arg(struct mail_search_arg *arg, void *context)
+static void search_header_arg(struct mail_search_arg *arg,
+ struct search_header_context *ctx)
{
- struct search_header_context *ctx = context;
struct header_search_context *hdr_search_ctx;
int ret;
@@ -437,10 +433,9 @@
}
}
-static void search_header(struct message_header_line *hdr, void *context)
+static void search_header(struct message_header_line *hdr,
+ struct search_header_context *ctx)
{
- struct search_header_context *ctx = context;
-
if (hdr == NULL) {
/* end of headers, mark all unknown SEARCH_HEADERs unmatched */
mail_search_args_foreach(ctx->args, search_header_unmatch, ctx);
@@ -461,9 +456,9 @@
}
}
-static void search_body(struct mail_search_arg *arg, void *context)
+static void search_body(struct mail_search_arg *arg,
+ struct search_body_context *ctx)
{
- struct search_body_context *ctx = context;
enum message_body_search_error error;
int ret;
bool retry = FALSE;
- Previous message: [dovecot-cvs] dovecot/src/lib-storage mail-storage.c, 1.66, 1.67 mail-storage.h, 1.121, 1.122
- Next message: [dovecot-cvs] dovecot/src/lib-storage/index/maildir maildir-copy.c, 1.47, 1.48 maildir-mail.c, 1.30, 1.31 maildir-sync.c, 1.86, 1.87
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list