[dovecot-cvs] dovecot/src/imap cmd-append.c,1.31,1.32
cras at procontrol.fi
cras at procontrol.fi
Sun Nov 9 20:26:27 EET 2003
- Previous message: [dovecot-cvs] dovecot/src/lib-index mail-cache.c,1.23,1.24
mail-index.c,1.102,1.103
- Next message: [dovecot-cvs]
dovecot/src/lib istream-limit.c,NONE,1.1 Makefile.am,1.34,1.35
iostream-internal.h,1.3,1.4 istream-data.c,1.6,1.7
istream-file.c,1.13,1.14 istream-internal.h,1.4,1.5
istream-mmap.c,1.7,1.8 istream.c,1.13,1.14 istream.h,1.8,1.9
ostream-file.c,1.23,1.24
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/dovecot/src/imap
In directory danu:/tmp/cvs-serv3937/imap
Modified Files:
cmd-append.c
Log Message:
istream rewrite. instead of directly setting any limits to stream, you now
have to use i_stream_create_limit() to existing stream. this should make the
istreams much easier to create and understand how they work.
Index: cmd-append.c
===================================================================
RCS file: /home/cvs/dovecot/src/imap/cmd-append.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- cmd-append.c 16 Oct 2003 15:50:20 -0000 1.31
+++ cmd-append.c 9 Nov 2003 18:26:25 -0000 1.32
@@ -54,6 +54,7 @@
struct imap_arg_list *flags_list;
struct mailbox_custom_flags old_flags;
struct mail_full_flags flags;
+ struct istream *input;
time_t internal_date;
const char *mailbox, *internal_date_str;
uoff_t msg_size;
@@ -180,14 +181,16 @@
}
/* save the mail */
- i_stream_set_read_limit(client->input,
- client->input->v_offset + msg_size);
+ input = i_stream_create_limit(default_pool, client->input,
+ client->input->v_offset,
+ msg_size);
if (!box->save_next(ctx, &flags, internal_date,
- timezone_offset, client->input)) {
+ timezone_offset, input)) {
+ i_stream_unref(input);
client_send_storage_error(client, storage);
break;
}
- i_stream_set_read_limit(client->input, 0);
+ i_stream_unref(input);
if (client->input->closed)
break;
- Previous message: [dovecot-cvs] dovecot/src/lib-index mail-cache.c,1.23,1.24
mail-index.c,1.102,1.103
- Next message: [dovecot-cvs]
dovecot/src/lib istream-limit.c,NONE,1.1 Makefile.am,1.34,1.35
iostream-internal.h,1.3,1.4 istream-data.c,1.6,1.7
istream-file.c,1.13,1.14 istream-internal.h,1.4,1.5
istream-mmap.c,1.7,1.8 istream.c,1.13,1.14 istream.h,1.8,1.9
ostream-file.c,1.23,1.24
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list