[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-file.c, 1.15,
1.16 mbox-save.c, 1.92, 1.93 mbox-storage.c, 1.139,
1.140 mbox-sync-rewrite.c, 1.61, 1.62
cras at dovecot.org
cras at dovecot.org
Sun Feb 26 12:05:27 EET 2006
Update of /var/lib/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv5842/lib-storage/index/mbox
Modified Files:
mbox-file.c mbox-save.c mbox-storage.c mbox-sync-rewrite.c
Log Message:
Added i_stream_destroy() and o_stream_destroy() and used them instead of
*_stream_unref() where possible. Fixes at least one problem with io_remove()
being called after socket was closed, which caused problems with epoll.
Index: mbox-file.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-file.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- mbox-file.c 14 Jan 2006 18:47:52 -0000 1.15
+++ mbox-file.c 26 Feb 2006 10:05:22 -0000 1.16
@@ -127,15 +127,14 @@
mbox_file_fix_atime(mbox);
if (mbox->mbox_stream != NULL)
- i_stream_unref(&mbox->mbox_stream);
+ i_stream_destroy(&mbox->mbox_stream);
if (mbox->mbox_file_stream != NULL) {
if (mbox->mbox_fd == -1) {
/* read-only mbox stream */
i_assert(mbox->mbox_readonly);
} else {
- i_stream_close(mbox->mbox_file_stream);
- i_stream_unref(&mbox->mbox_file_stream);
+ i_stream_destroy(&mbox->mbox_file_stream);
}
}
}
Index: mbox-save.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-save.c,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -d -r1.92 -r1.93
--- mbox-save.c 22 Feb 2006 16:02:27 -0000 1.92
+++ mbox-save.c 26 Feb 2006 10:05:22 -0000 1.93
@@ -528,9 +528,9 @@
}
if (ctx->input != NULL)
- i_stream_unref(&ctx->input);
+ i_stream_destroy(&ctx->input);
if (ctx->body_output != NULL)
- o_stream_unref(&ctx->body_output);
+ o_stream_destroy(&ctx->body_output);
if (ctx->failed && ctx->mail_offset != (uoff_t)-1) {
/* saving this mail failed - truncate back to beginning of it */
@@ -565,7 +565,7 @@
i_assert(ctx->body_output == NULL);
if (ctx->output != NULL)
- o_stream_unref(&ctx->output);
+ o_stream_destroy(&ctx->output);
if (ctx->mail != NULL)
index_mail_free(ctx->mail);
str_free(&ctx->headers);
Index: mbox-storage.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-storage.c,v
retrieving revision 1.139
retrieving revision 1.140
diff -u -d -r1.139 -r1.140
--- mbox-storage.c 22 Feb 2006 14:52:14 -0000 1.139
+++ mbox-storage.c 26 Feb 2006 10:05:22 -0000 1.140
@@ -1039,7 +1039,7 @@
mbox_file_close(mbox);
if (mbox->mbox_file_stream != NULL)
- i_stream_unref(&mbox->mbox_file_stream);
+ i_stream_destroy(&mbox->mbox_file_stream);
index_storage_mailbox_free(box);
return ret;
Index: mbox-sync-rewrite.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync-rewrite.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- mbox-sync-rewrite.c 14 Jan 2006 18:47:52 -0000 1.61
+++ mbox-sync-rewrite.c 26 Feb 2006 10:05:22 -0000 1.62
@@ -51,7 +51,7 @@
}
i_stream_sync(sync_ctx->input);
- o_stream_unref(&output);
+ o_stream_destroy(&output);
return (int)ret;
}
More information about the dovecot-cvs
mailing list