[dovecot-cvs] dovecot/src/lib ostream-file.c, 1.26, 1.27 ostream.h,
1.7, 1.8
cras at procontrol.fi
cras at procontrol.fi
Mon Jun 28 19:14:01 EEST 2004
Update of /home/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv30317
Modified Files:
ostream-file.c ostream.h
Log Message:
Allow giving 0 max_buffer_size, in which case "optimal" size is used.
Index: ostream-file.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib/ostream-file.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- ostream-file.c 26 May 2004 20:13:12 -0000 1.26
+++ ostream-file.c 28 Jun 2004 16:13:59 -0000 1.27
@@ -858,5 +858,9 @@
fstream->no_socket_cork = TRUE;
}
}
+
+ if (max_buffer_size == 0)
+ fstream->max_buffer_size = fstream->optimal_block_size;
+
return ostream;
}
Index: ostream.h
===================================================================
RCS file: /home/cvs/dovecot/src/lib/ostream.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- ostream.h 23 May 2003 14:40:50 -0000 1.7
+++ ostream.h 28 Jun 2004 16:13:59 -0000 1.8
@@ -10,6 +10,8 @@
struct _ostream *real_stream;
};
+/* Create new output stream from given file descriptor.
+ If max_buffer_size is 0, an "optimal" buffer size is used (max 128kB). */
struct ostream *
o_stream_create_file(int fd, pool_t pool, size_t max_buffer_size,
int autoclose_fd);
More information about the dovecot-cvs
mailing list