[dovecot-cvs] dovecot/src/lib-index/maildir maildir-build.c,1.12,1.13 maildir-index.h,1.7,1.8 maildir-sync.c,1.13,1.14 maildir-update.c,1.10,1.11
cras at procontrol.fi
cras at procontrol.fi
Sun Oct 27 01:11:32 EEST 2002
- Previous message: [dovecot-cvs] dovecot/src/lib ibuffer-mmap.c,1.6,1.7
- Next message: [dovecot-cvs] dovecot/src/lib-storage/index index-copy.c,1.17,1.18 index-fetch.c,1.29,1.30 index-msgcache.c,1.10,1.11 index-search.c,1.34,1.35 index-storage.c,1.16,1.17 index-storage.h,1.16,1.17
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/dovecot/src/lib-index/maildir
In directory danu:/tmp/cvs-serv6374
Modified Files:
maildir-build.c maildir-index.h maildir-sync.c
maildir-update.c
Log Message:
Don't bother going through all that trouble to send file size to ibuffer.
One extra fstat() isn't that bad, and we'll soon get rid of the first one..
Index: maildir-build.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/maildir/maildir-build.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- maildir-build.c 20 Oct 2002 01:35:48 -0000 1.12
+++ maildir-build.c 26 Oct 2002 21:11:30 -0000 1.13
@@ -69,8 +69,7 @@
MAILDIR_LOCATION_EXTRA_SPACE);
/* parse the header and update record's fields */
- failed = !maildir_record_update(index, update, fd,
- st.st_size);
+ failed = !maildir_record_update(index, update, fd);
if (!index->update_end(update) || failed)
return FALSE;
Index: maildir-index.h
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/maildir/maildir-index.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- maildir-index.h 20 Oct 2002 01:35:48 -0000 1.7
+++ maildir-index.h 26 Oct 2002 21:11:30 -0000 1.8
@@ -23,7 +23,6 @@
IBuffer *maildir_open_mail(MailIndex *index, MailIndexRecord *rec,
int *deleted);
-int maildir_record_update(MailIndex *index, MailIndexUpdate *update,
- int fd, off_t file_size);
+int maildir_record_update(MailIndex *index, MailIndexUpdate *update, int fd);
#endif
Index: maildir-sync.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/maildir/maildir-sync.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- maildir-sync.c 25 Oct 2002 03:28:39 -0000 1.13
+++ maildir-sync.c 26 Oct 2002 21:11:30 -0000 1.14
@@ -16,7 +16,7 @@
static int maildir_index_sync_file(MailIndex *index, MailIndexRecord *rec,
unsigned int seq, const char *fname,
- const char *path, off_t file_size,
+ const char *path,
int fname_changed, int file_changed)
{
MailIndexUpdate *update;
@@ -41,7 +41,7 @@
index_file_set_syscall_error(index, path, "open()");
failed = TRUE;
} else {
- if (!maildir_record_update(index, update, fd, file_size))
+ if (!maildir_record_update(index, update, fd))
failed = TRUE;
if (close(fd) < 0) {
index_file_set_syscall_error(index, path,
@@ -124,8 +124,7 @@
fname_changed = strcmp(value, fname) != 0;
if (fname_changed || file_changed) {
if (!maildir_index_sync_file(index, rec, seq, value,
- str, st.st_size,
- fname_changed,
+ str, fname_changed,
file_changed))
return FALSE;
}
Index: maildir-update.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/maildir/maildir-update.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- maildir-update.c 20 Oct 2002 01:35:48 -0000 1.10
+++ maildir-update.c 26 Oct 2002 21:11:30 -0000 1.11
@@ -4,8 +4,7 @@
#include "ibuffer.h"
#include "maildir-index.h"
-int maildir_record_update(MailIndex *index, MailIndexUpdate *update,
- int fd, off_t file_size)
+int maildir_record_update(MailIndex *index, MailIndexUpdate *update, int fd)
{
IBuffer *inbuf;
MailField cache_fields;
@@ -18,7 +17,7 @@
t_push();
inbuf = i_buffer_create_mmap(fd, data_stack_pool, MAIL_MMAP_BLOCK_SIZE,
- 0, file_size, FALSE);
+ 0, 0, FALSE);
mail_index_update_headers(update, inbuf, cache_fields, NULL, NULL);
i_buffer_unref(inbuf);
t_pop();
- Previous message: [dovecot-cvs] dovecot/src/lib ibuffer-mmap.c,1.6,1.7
- Next message: [dovecot-cvs] dovecot/src/lib-storage/index index-copy.c,1.17,1.18 index-fetch.c,1.29,1.30 index-msgcache.c,1.10,1.11 index-search.c,1.34,1.35 index-storage.c,1.16,1.17 index-storage.h,1.16,1.17
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list