[dovecot-cvs] dovecot/src/imap client.c, 1.62, 1.63 cmd-append.c,
1.70, 1.71 cmd-close.c, 1.16, 1.17 cmd-copy.c, 1.32,
1.33 cmd-delete.c, 1.10, 1.11 cmd-idle.c, 1.26,
1.27 cmd-list.c, 1.50, 1.51 cmd-logout.c, 1.10,
1.11 cmd-search.c, 1.27, 1.28 cmd-select.c, 1.39,
1.40 cmd-status.c, 1.25, 1.26 cmd-store.c, 1.34,
1.35 cmd-unselect.c, 1.7, 1.8 imap-expunge.c, 1.7,
1.8 imap-fetch-body.c, 1.26, 1.27 imap-fetch.c, 1.41,
1.42 imap-sort.c, 1.25, 1.26 imap-sync.c, 1.15,
1.16 imap-thread.c, 1.19, 1.20 main.c, 1.69, 1.70 namespace.c,
1.12, 1.13
cras at dovecot.org
cras at dovecot.org
Sat Jan 14 20:47:28 EET 2006
- Previous message: [dovecot-cvs] dovecot/src/lib-charset charset-iconv.c, 1.17,
1.18 charset-utf8.c, 1.13, 1.14 charset-utf8.h, 1.8, 1.9
- Next message: [dovecot-cvs] dovecot/src/lib-dict dict-client.c, 1.4,
1.5 dict-sql.c, 1.4, 1.5 dict.c, 1.4, 1.5 dict.h, 1.4, 1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/lib/cvs/dovecot/src/imap
In directory talvi:/tmp/cvs-serv16037/imap
Modified Files:
client.c cmd-append.c cmd-close.c cmd-copy.c cmd-delete.c
cmd-idle.c cmd-list.c cmd-logout.c cmd-search.c cmd-select.c
cmd-status.c cmd-store.c cmd-unselect.c imap-expunge.c
imap-fetch-body.c imap-fetch.c imap-sort.c imap-sync.c
imap-thread.c main.c namespace.c
Log Message:
deinit, unref, destroy, close, free, etc. functions now take a pointer to
their data pointer, and set it to NULL. This makes double-frees less likely
to cause security holes.
Index: client.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/client.c,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -d -r1.62 -r1.63
--- client.c 14 Jan 2006 14:51:29 -0000 1.62
+++ client.c 14 Jan 2006 18:47:21 -0000 1.63
@@ -77,15 +77,15 @@
}
if (client->mailbox != NULL)
- mailbox_close(client->mailbox);
+ mailbox_close(&client->mailbox);
namespace_deinit(client->namespaces);
- imap_parser_destroy(client->parser);
+ imap_parser_destroy(&client->parser);
if (client->io != NULL)
- io_remove(client->io);
+ io_remove(&client->io);
- i_stream_unref(client->input);
- o_stream_unref(client->output);
+ i_stream_unref(&client->input);
+ o_stream_unref(&client->output);
pool_unref(client->keywords.pool);
pool_unref(client->cmd.pool);
@@ -377,8 +377,7 @@
if (client->command_pending) {
/* already processing one command. wait. */
- io_remove(client->io);
- client->io = NULL;
+ io_remove(&client->io);
return;
}
@@ -495,5 +494,5 @@
client_destroy(my_client);
}
- timeout_remove(to_idle);
+ timeout_remove(&to_idle);
}
Index: cmd-append.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/cmd-append.c,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -d -r1.70 -r1.71
--- cmd-append.c 13 Jan 2006 20:25:59 -0000 1.70
+++ cmd-append.c 14 Jan 2006 18:47:21 -0000 1.71
@@ -105,22 +105,21 @@
{
ctx->client->input_skip_line = TRUE;
- io_remove(ctx->client->io);
- ctx->client->io = NULL;
+ io_remove(&ctx->client->io);
- imap_parser_destroy(ctx->save_parser);
+ imap_parser_destroy(&ctx->save_parser);
if (ctx->input != NULL)
- i_stream_unref(ctx->input);
+ i_stream_unref(&ctx->input);
if (ctx->save_ctx != NULL)
- mailbox_save_cancel(ctx->save_ctx);
+ mailbox_save_cancel(&ctx->save_ctx);
if (ctx->t != NULL)
- mailbox_transaction_rollback(ctx->t);
+ mailbox_transaction_rollback(&ctx->t);
if (ctx->box != ctx->cmd->client->mailbox && ctx->box != NULL)
- mailbox_close(ctx->box);
+ mailbox_close(&ctx->box);
}
static bool cmd_append_continue_cancel(struct client_command_context *cmd)
@@ -199,8 +198,7 @@
return TRUE;
}
- ret = mailbox_transaction_commit(ctx->t, 0);
- ctx->t = NULL;
+ ret = mailbox_transaction_commit(&ctx->t, 0);
if (ret < 0) {
client_send_storage_error(cmd, ctx->storage);
cmd_append_finish(ctx);
@@ -272,7 +270,7 @@
ctx->input, FALSE);
if (keywords != NULL)
- mailbox_keywords_free(ctx->t, keywords);
+ mailbox_keywords_free(ctx->t, &keywords);
client->command_pending = TRUE;
cmd->func = cmd_append_continue_message;
@@ -290,8 +288,7 @@
if (mailbox_save_continue(ctx->save_ctx) < 0) {
/* we still have to finish reading the message
from client */
- mailbox_save_cancel(ctx->save_ctx);
- ctx->save_ctx = NULL;
+ mailbox_save_cancel(&ctx->save_ctx);
}
}
@@ -305,7 +302,7 @@
/* finished */
bool all_written = ctx->input->v_offset == ctx->msg_size;
- i_stream_unref(ctx->input);
+ i_stream_unref(&ctx->input);
ctx->input = NULL;
if (ctx->save_ctx == NULL) {
@@ -316,8 +313,8 @@
/* client disconnected before it finished sending the
whole message. */
failed = TRUE;
- mailbox_save_cancel(ctx->save_ctx);
- } else if (mailbox_save_finish(ctx->save_ctx, NULL) < 0) {
+ mailbox_save_cancel(&ctx->save_ctx);
+ } else if (mailbox_save_finish(&ctx->save_ctx, NULL) < 0) {
failed = TRUE;
client_send_storage_error(cmd, ctx->storage);
} else {
@@ -387,8 +384,7 @@
if (mailbox_get_status(ctx->box, STATUS_KEYWORDS,
&status) < 0) {
client_send_storage_error(cmd, ctx->storage);
- mailbox_close(ctx->box);
- ctx->box = NULL;
+ mailbox_close(&ctx->box);
} else {
client_save_keywords(&client->keywords,
status.keywords);
@@ -398,7 +394,7 @@
MAILBOX_TRANSACTION_FLAG_EXTERNAL);
}
- io_remove(client->io);
+ io_remove(&client->io);
client->io = io_add(i_stream_get_fd(client->input), IO_READ,
client_input, client);
/* append is special because we're only waiting on client input, not
Index: cmd-close.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/cmd-close.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- cmd-close.c 13 Jan 2006 20:25:59 -0000 1.16
+++ cmd-close.c 14 Jan 2006 18:47:21 -0000 1.17
@@ -21,7 +21,7 @@
client_send_untagged_storage_error(client, storage);
}
- if (mailbox_close(mailbox) < 0)
+ if (mailbox_close(&mailbox) < 0)
client_send_untagged_storage_error(client, storage);
client_send_tagline(cmd, "OK Close completed.");
Index: cmd-copy.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/cmd-copy.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- cmd-copy.c 13 Jan 2006 20:25:59 -0000 1.32
+++ cmd-copy.c 14 Jan 2006 18:47:21 -0000 1.33
@@ -34,14 +34,14 @@
if (mailbox_copy(t, mail, mail_get_flags(mail),
keywords, NULL) < 0)
ret = -1;
- mailbox_keywords_free(t, keywords);
+ mailbox_keywords_free(t, &keywords);
}
- mail_free(mail);
+ mail_free(&mail);
- if (mailbox_search_deinit(search_ctx) < 0)
+ if (mailbox_search_deinit(&search_ctx) < 0)
ret = -1;
- if (mailbox_transaction_commit(src_trans, 0) < 0)
+ if (mailbox_transaction_commit(&src_trans, 0) < 0)
ret = -1;
return ret;
@@ -94,15 +94,15 @@
ret = fetch_and_copy(t, client->mailbox, search_arg);
if (ret <= 0)
- mailbox_transaction_rollback(t);
+ mailbox_transaction_rollback(&t);
else {
- if (mailbox_transaction_commit(t, 0) < 0)
+ if (mailbox_transaction_commit(&t, 0) < 0)
ret = -1;
}
if (destbox != client->mailbox) {
sync_flags |= MAILBOX_SYNC_FLAG_FAST;
- mailbox_close(destbox);
+ mailbox_close(&destbox);
}
if (ret > 0)
Index: cmd-delete.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/cmd-delete.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- cmd-delete.c 13 Jan 2006 20:25:59 -0000 1.10
+++ cmd-delete.c 14 Jan 2006 18:47:21 -0000 1.11
@@ -26,7 +26,7 @@
storage = mailbox_get_storage(mailbox);
client->mailbox = NULL;
- if (mailbox_close(mailbox) < 0)
+ if (mailbox_close(&mailbox) < 0)
client_send_untagged_storage_error(client, storage);
} else {
storage = client_find_storage(cmd, &name);
Index: cmd-idle.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/cmd-idle.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- cmd-idle.c 13 Jan 2006 20:25:59 -0000 1.26
+++ cmd-idle.c 14 Jan 2006 18:47:21 -0000 1.27
@@ -32,14 +32,10 @@
{
struct client *client = ctx->client;
- if (ctx->idle_to != NULL) {
- timeout_remove(ctx->idle_to);
- ctx->idle_to = NULL;
- }
- if (ctx->keepalive_to != NULL) {
- timeout_remove(ctx->keepalive_to);
- ctx->keepalive_to = NULL;
- }
+ if (ctx->idle_to != NULL)
+ timeout_remove(&ctx->idle_to);
+ if (ctx->keepalive_to != NULL)
+ timeout_remove(&ctx->keepalive_to);
if (ctx->sync_ctx != NULL) {
/* we're here only in connection failure cases */
@@ -54,8 +50,7 @@
t_strdup_printf("* %u EXPUNGE", ctx->dummy_seq));
}
- io_remove(client->io);
- client->io = NULL;
+ io_remove(&client->io);
if (client->mailbox != NULL)
mailbox_notify_changes(client->mailbox, 0, NULL, NULL);
@@ -97,8 +92,7 @@
if (ctx->sync_ctx != NULL) {
/* we're still sending output to client. wait until it's all
sent so we don't lose any changes. */
- io_remove(client->io);
- client->io = NULL;
+ io_remove(&client->io);
return;
}
@@ -130,8 +124,7 @@
we're about to disconnect unless it does something. send a fake
EXISTS to see if it responds. it's expunged later. */
- timeout_remove(ctx->idle_to);
- ctx->idle_to = NULL;
+ timeout_remove(&ctx->idle_to);
if (ctx->sync_ctx != NULL) {
/* we're already syncing.. do this after it's finished */
@@ -246,7 +239,7 @@
}
client_send_line(client, "+ idling");
- io_remove(client->io);
+ io_remove(&client->io);
client->io = io_add(i_stream_get_fd(client->input),
IO_READ, idle_client_input, ctx);
Index: cmd-list.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/cmd-list.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- cmd-list.c 14 Jan 2006 17:10:02 -0000 1.50
+++ cmd-list.c 14 Jan 2006 18:47:21 -0000 1.51
@@ -165,7 +165,7 @@
list_namespace_inbox(client, ctx);
t_pop();
- ret = mail_storage_mailbox_list_deinit(ctx->list_ctx);
+ ret = mail_storage_mailbox_list_deinit(&ctx->list_ctx);
ctx->list_ctx = NULL;
return ret < 0 ? -1 : 1;
}
Index: cmd-logout.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/cmd-logout.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- cmd-logout.c 13 Jan 2006 20:25:59 -0000 1.10
+++ cmd-logout.c 14 Jan 2006 18:47:21 -0000 1.11
@@ -15,8 +15,7 @@
/* this could be done at client_disconnect() as well,
but eg. mbox rewrite takes a while so the waiting is
better to happen before "OK" message. */
- mailbox_close(client->mailbox);
- client->mailbox = NULL;
+ mailbox_close(&client->mailbox);
}
client_send_tagline(cmd, "OK Logout completed.");
Index: cmd-search.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/cmd-search.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- cmd-search.c 13 Jan 2006 20:25:59 -0000 1.27
+++ cmd-search.c 14 Jan 2006 18:47:21 -0000 1.28
@@ -25,7 +25,7 @@
trans = mailbox_transaction_begin(client->mailbox, 0);
ctx = mailbox_search_init(trans, charset, sargs, NULL);
if (ctx == NULL) {
- mailbox_transaction_rollback(trans);
+ mailbox_transaction_rollback(&trans);
return FALSE;
}
@@ -42,11 +42,11 @@
str_printfa(str, " %u", uid ? mail->uid : mail->seq);
}
- mail_free(mail);
+ mail_free(&mail);
- ret = mailbox_search_deinit(ctx);
+ ret = mailbox_search_deinit(&ctx);
- if (mailbox_transaction_commit(trans, 0) < 0)
+ if (mailbox_transaction_commit(&trans, 0) < 0)
ret = -1;
if (!first || ret == 0) {
Index: cmd-select.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/cmd-select.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- cmd-select.c 13 Jan 2006 20:25:59 -0000 1.39
+++ cmd-select.c 14 Jan 2006 18:47:21 -0000 1.40
@@ -21,7 +21,7 @@
client->mailbox = NULL;
storage = mailbox_get_storage(box);
- if (mailbox_close(box) < 0)
+ if (mailbox_close(&box) < 0)
client_send_untagged_storage_error(client, storage);
}
@@ -38,7 +38,7 @@
if (imap_sync_nonselected(box, MAILBOX_SYNC_FLAG_FULL_READ) < 0) {
client_send_storage_error(cmd, storage);
- mailbox_close(box);
+ mailbox_close(&box);
return TRUE;
}
@@ -47,7 +47,7 @@
STATUS_UIDNEXT | STATUS_KEYWORDS,
&status) < 0) {
client_send_storage_error(cmd, storage);
- mailbox_close(box);
+ mailbox_close(&box);
return TRUE;
}
Index: cmd-status.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/cmd-status.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- cmd-status.c 13 Jan 2006 20:25:59 -0000 1.25
+++ cmd-status.c 14 Jan 2006 18:47:21 -0000 1.26
@@ -71,7 +71,7 @@
failed = mailbox_get_status(box, items, status) < 0;
if (box != client->mailbox)
- mailbox_close(box);
+ mailbox_close(&box);
return !failed;
}
Index: cmd-store.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/cmd-store.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- cmd-store.c 13 Jan 2006 20:25:59 -0000 1.34
+++ cmd-store.c 14 Jan 2006 18:47:21 -0000 1.35
@@ -109,18 +109,18 @@
}
}
}
- mail_free(mail);
+ mail_free(&mail);
if (keywords != NULL)
- mailbox_keywords_free(t, keywords);
+ mailbox_keywords_free(t, &keywords);
- if (mailbox_search_deinit(search_ctx) < 0)
+ if (mailbox_search_deinit(&search_ctx) < 0)
failed = TRUE;
if (failed)
- mailbox_transaction_rollback(t);
+ mailbox_transaction_rollback(&t);
else {
- if (mailbox_transaction_commit(t, 0) < 0)
+ if (mailbox_transaction_commit(&t, 0) < 0)
failed = TRUE;
}
Index: cmd-unselect.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/cmd-unselect.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- cmd-unselect.c 13 Jan 2006 20:25:59 -0000 1.7
+++ cmd-unselect.c 14 Jan 2006 18:47:21 -0000 1.8
@@ -15,7 +15,7 @@
client->mailbox = NULL;
storage = mailbox_get_storage(mailbox);
- if (mailbox_close(mailbox) < 0)
+ if (mailbox_close(&mailbox) < 0)
client_send_untagged_storage_error(client, storage);
client_send_tagline(cmd, "OK Unselect completed.");
Index: imap-expunge.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/imap-expunge.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- imap-expunge.c 13 Jan 2006 20:25:59 -0000 1.7
+++ imap-expunge.c 14 Jan 2006 18:47:21 -0000 1.8
@@ -30,18 +30,18 @@
break;
}
}
- mail_free(mail);
+ mail_free(&mail);
}
- if (mailbox_search_deinit(ctx) < 0)
+ if (mailbox_search_deinit(&ctx) < 0)
return FALSE;
if (failed)
- mailbox_transaction_rollback(t);
+ mailbox_transaction_rollback(&t);
else {
flags = MAILBOX_SYNC_FLAG_FULL_READ |
MAILBOX_SYNC_FLAG_FULL_WRITE;
- if (mailbox_transaction_commit(t, flags) < 0)
+ if (mailbox_transaction_commit(&t, flags) < 0)
failed = TRUE;
}
Index: imap-fetch-body.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/imap-fetch-body.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- imap-fetch-body.c 13 Jan 2006 20:25:59 -0000 1.26
+++ imap-fetch-body.c 14 Jan 2006 18:47:21 -0000 1.27
@@ -260,7 +260,7 @@
input = i_stream_create_limit(default_pool, ctx->cur_input,
ctx->cur_input->v_offset,
ctx->cur_size);
- i_stream_unref(ctx->cur_input);
+ i_stream_unref(&ctx->cur_input);
ctx->cur_input = input;
ctx->cont_handler = fetch_stream_send_direct;
@@ -372,7 +372,7 @@
return -1;
}
- i_stream_unref(ctx->cur_input);
+ i_stream_unref(&ctx->cur_input);
ctx->cur_input = input;
ctx->update_partial = FALSE;
Index: imap-fetch.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/imap-fetch.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- imap-fetch.c 13 Jan 2006 20:25:59 -0000 1.41
+++ imap-fetch.c 14 Jan 2006 18:47:21 -0000 1.42
@@ -236,10 +236,8 @@
}
if (ctx->cur_mail == NULL) {
- if (ctx->cur_input != NULL) {
- i_stream_unref(ctx->cur_input);
- ctx->cur_input = NULL;
- }
+ if (ctx->cur_input != NULL)
+ i_stream_unref(&ctx->cur_input);
if (mailbox_search_next(ctx->search_ctx,
ctx->mail) <= 0)
@@ -304,33 +302,31 @@
int imap_fetch_deinit(struct imap_fetch_context *ctx)
{
- str_free(ctx->cur_str);
+ str_free(&ctx->cur_str);
if (!ctx->line_finished) {
if (o_stream_send(ctx->client->output, ")\r\n", 3) < 0)
ctx->failed = TRUE;
}
- if (ctx->cur_input != NULL) {
- i_stream_unref(ctx->cur_input);
- ctx->cur_input = NULL;
- }
+ if (ctx->cur_input != NULL)
+ i_stream_unref(&ctx->cur_input);
if (ctx->mail != NULL)
- mail_free(ctx->mail);
+ mail_free(&ctx->mail);
if (ctx->search_ctx != NULL) {
- if (mailbox_search_deinit(ctx->search_ctx) < 0)
+ if (mailbox_search_deinit(&ctx->search_ctx) < 0)
ctx->failed = TRUE;
}
if (ctx->all_headers_ctx != NULL)
- mailbox_header_lookup_deinit(ctx->all_headers_ctx);
+ mailbox_header_lookup_deinit(&ctx->all_headers_ctx);
if (ctx->trans != NULL) {
if (ctx->failed)
- mailbox_transaction_rollback(ctx->trans);
+ mailbox_transaction_rollback(&ctx->trans);
else {
- if (mailbox_transaction_commit(ctx->trans, 0) < 0)
+ if (mailbox_transaction_commit(&ctx->trans, 0) < 0)
ctx->failed = TRUE;
}
}
Index: imap-sort.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/imap-sort.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- imap-sort.c 13 Jan 2006 20:25:59 -0000 1.25
+++ imap-sort.c 14 Jan 2006 18:47:21 -0000 1.26
@@ -248,12 +248,12 @@
mail_sort_input(ctx, mail);
mail_sort_flush(ctx);
- ret = mailbox_search_deinit(ctx->search_ctx);
+ ret = mailbox_search_deinit(&ctx->search_ctx);
- mail_free(mail);
- mail_free(ctx->other_mail);
+ mail_free(&mail);
+ mail_free(&ctx->other_mail);
- if (mailbox_transaction_commit(ctx->t, 0) < 0)
+ if (mailbox_transaction_commit(&ctx->t, 0) < 0)
ret = -1;
if (ctx->written || ret == 0) {
@@ -263,7 +263,7 @@
}
if (headers_ctx != NULL)
- mailbox_header_lookup_deinit(headers_ctx);
+ mailbox_header_lookup_deinit(&headers_ctx);
mail_sort_deinit(ctx);
return ret;
}
Index: imap-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/imap-sync.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- imap-sync.c 13 Jan 2006 20:25:59 -0000 1.15
+++ imap-sync.c 14 Jan 2006 18:47:21 -0000 1.16
@@ -61,15 +61,15 @@
{
struct mailbox_status status;
- mail_free(ctx->mail);
+ mail_free(&ctx->mail);
- if (mailbox_sync_deinit(ctx->sync_ctx, &status) < 0 || ctx->failed) {
- mailbox_transaction_rollback(ctx->t);
+ if (mailbox_sync_deinit(&ctx->sync_ctx, &status) < 0 || ctx->failed) {
+ mailbox_transaction_rollback(&ctx->t);
i_free(ctx);
return -1;
}
- mailbox_transaction_commit(ctx->t, 0);
+ mailbox_transaction_commit(&ctx->t, 0);
t_push();
@@ -183,7 +183,7 @@
ctx = mailbox_sync_init(box, flags);
while (mailbox_sync_next(ctx, &sync_rec) > 0)
;
- return mailbox_sync_deinit(ctx, &status);
+ return mailbox_sync_deinit(&ctx, &status);
}
static bool cmd_sync_continue(struct client_command_context *cmd)
Index: imap-thread.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/imap-thread.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- imap-thread.c 14 Jan 2006 17:14:28 -0000 1.19
+++ imap-thread.c 14 Jan 2006 18:47:21 -0000 1.20
@@ -142,17 +142,17 @@
while (mailbox_search_next(ctx->search_ctx, mail) > 0)
mail_thread_input(ctx, mail);
- mail_free(mail);
+ mail_free(&mail);
o_stream_send_str(client->output, "* THREAD");
mail_thread_finish(ctx);
o_stream_send_str(client->output, "\r\n");
- ret = mailbox_search_deinit(ctx->search_ctx);
- if (mailbox_transaction_commit(ctx->t, 0) < 0)
+ ret = mailbox_search_deinit(&ctx->search_ctx);
+ if (mailbox_transaction_commit(&ctx->t, 0) < 0)
ret = -1;
- mailbox_header_lookup_deinit(headers_ctx);
+ mailbox_header_lookup_deinit(&headers_ctx);
mail_thread_deinit(ctx);
return ret;
}
@@ -708,8 +708,8 @@
}
}
- mail_free(ctx->mail);
- mailbox_header_lookup_deinit(headers_ctx);
+ mail_free(&ctx->mail);
+ mailbox_header_lookup_deinit(&headers_ctx);
}
static void reset_children_parent(struct node *parent)
Index: main.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/main.c,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -d -r1.69 -r1.70
--- main.c 30 Dec 2005 22:16:35 -0000 1.69
+++ main.c 14 Jan 2006 18:47:21 -0000 1.70
@@ -198,7 +198,7 @@
static void main_deinit(void)
{
- module_dir_unload(modules);
+ module_dir_unload(&modules);
commands_deinit();
clients_deinit();
@@ -207,7 +207,7 @@
random_deinit();
pool_unref(namespace_pool);
- str_free(capability_string);
+ str_free(&capability_string);
lib_signals_deinit();
closelog();
@@ -238,7 +238,7 @@
io_loop_run(ioloop);
main_deinit();
- io_loop_destroy(ioloop);
+ io_loop_destroy(&ioloop);
lib_deinit();
return 0;
Index: namespace.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/namespace.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- namespace.c 14 Jan 2006 17:10:02 -0000 1.12
+++ namespace.c 14 Jan 2006 18:47:21 -0000 1.13
@@ -173,7 +173,7 @@
void namespace_deinit(struct namespace *namespaces)
{
while (namespaces != NULL) {
- mail_storage_destroy(namespaces->storage);
+ mail_storage_destroy(&namespaces->storage);
namespaces = namespaces->next;
}
}
- Previous message: [dovecot-cvs] dovecot/src/lib-charset charset-iconv.c, 1.17,
1.18 charset-utf8.c, 1.13, 1.14 charset-utf8.h, 1.8, 1.9
- Next message: [dovecot-cvs] dovecot/src/lib-dict dict-client.c, 1.4,
1.5 dict-sql.c, 1.4, 1.5 dict.c, 1.4, 1.5 dict.h, 1.4, 1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list