8aa8399893c66b40e2790a4568256807a6ec6742 |
|
30-Jan-2018 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
lib: ostream: Allow switching to a specific ioloop. |
bcb4e51a409d94ae670de96afb8483a4f7855294 |
|
01-Jan-2018 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
Updated copyright notices to include the year 2018. |
5bc75087b6feea54307be14ebbf009f8e9a8dd13 |
|
30-Oct-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: Remove explicit o_stream_flush() calls from ostream.close() methods
It's now being done automatically. |
23c8c511f98924acfc7048e9dc4ccc982c34e320 |
|
30-Oct-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: o_stream_uncork() - call o_stream_nflush() instead of o_stream_flush()
Otherwise flush errors may be unintentionally ignored. This change requires
that all the o_stream_uncork() callers must call o_stream_nfinish()
afterwards, unless the ostream is set to ignore errors. |
5f1d689131a75c39f064cbd4202373e7edf78f18 |
|
19-Sep-2017 |
Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> |
global: start relying on io_remove{,_closed}(NULL) being a no-op
Cleanup performed with the following semantic patch:
@@
expression E;
@@
- if (E != NULL) {
- io_remove(&E);
- }
+ io_remove(&E);
@@
expression E;
@@
- if (E != NULL) {
- io_remove_closed(&E);
- }
+ io_remove_closed(&E); |
2454dfa32c93c20a8522c6ed42fe057baaac9f9a |
|
01-Jan-2017 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
Updated copyright notices to include the year 2017. |
2ac5f36aa7c2e7a07ba8815d43a6d7483f62e74c |
|
16-Dec-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: Change string position/length from unsigned int to size_t
Mainly to avoid truncating >4GB strings, which might potentially cause
some security holes. Normally there are other limits, which prevent such
excessive strings from being created in the first place.
I'm sure this didn't find everything. Maybe everything could be found with
compiler warnings. -Wconversion kind of does it, but it gives way too many
unnecessary warnings.
These were mainly found with:
grep " = strlen"
egrep "unsigned int.*(size|len)" |
89d88a5bcf1619fc83d9680316f1333d40c9849f |
|
06-Jul-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: ostream-file now automatically corks during flush callback. |
e93184a9055c2530366dfe617e07199603c399dd |
|
06-Jun-2016 |
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi> |
lib: remove autoclose parameter from [io]_stream_create_fd
Use [io]_stream_create_fd_autoclose() for autoclose. |
378e6cb162b355d6f103526505bc00b9a78962e7 |
|
30-May-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
o_stream_send_istream() API changed again
The new API enforces the caller to correctly handle all the possible
situations. It also makes in unambiguous whether to wait for input or
output stream. |
d28179fd78550a58be44dcb1e3e830ab7d33172d |
|
19-May-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: Changed istream.abs_start_offset to be relative start_offset
i_stream_get_absolute_offset() walks through the stream's parents to get the
absolute offset. This allows streams to change their start_offset after
they have already created (e.g. istream-metawrap). |
e6e5e9c0309a48a1301577829fcebc5a83886705 |
|
18-May-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: ostream-file: Fixed o_stream_send_istream() within same file
When copying content backwards. |
56f5cea321c85b505d35d0ba11cfdd53c8bdd9d3 |
|
18-May-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: istream-file: Fixed o_stream_send_istream() |
6adf683655750bcb809275cd65dc75fd12214198 |
|
18-May-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: Simplified and clarified o_stream_send_istream() API |
8b2cf1c1bd8ddcea0525b62fd35ba76e136828a1 |
|
18-May-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: Added ostream.blocking boolean
Similar to istream.blocking. |
2fb246462dc1846a299ecc5530c2b90c53edcdb4 |
|
18-May-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: istream-file: Code cleanup
No functional changes |
573424407a2d3c1453638a643583a7cf10c129e1 |
|
16-May-2016 |
Phil Carmody <phil@dovecot.fi> |
lib: istream - more migration to i_stream_read_bytes()
This time a coccinelle semantic patch, again hand checked:
git grep 'i_stream_read_data' | sed s/:.*// | \
while read f; do spatch --sp-file istream.cocci --in-place "$f" ; done
-- 8< --- istream.cocci ---
@@
expression e1, e2, e3, e4;
@@
- i_stream_read_data(e1, e2, e3, e4 - 1)
+ i_stream_read_bytes(e1, e2, e3, e4)
-- 8< --- end
Signed-off-by: Phil Carmody <phil@dovecot.fi> |
2ac0ee86377636dcf9e8c0ddad93842b1fb3d46a |
|
30-Apr-2016 |
Stephan Bosch <stephan@rename-it.nl> |
lib: ostream-file: Allow creating derived file output streams. |
5e6d463808595353c6b8140bcfc12445bcd27ab4 |
|
30-Apr-2016 |
Stephan Bosch <stephan@rename-it.nl> |
lib: ostream-file: Split o_stream_file_writev() from o_stream_file_writev_full(). |
6fae619f0c18de2a4c0656593e029929a60c4956 |
|
30-Apr-2016 |
Stephan Bosch <stephan@rename-it.nl> |
lib: ostream-file: Renamed o_stream_writev() to o_stream_file_writev_full(). |
9c8699034c6d50403764fdec6915ab60a6012034 |
|
30-Apr-2016 |
Stephan Bosch <stephan@rename-it.nl> |
lib: ostream-file: Renamed iov_size to iov_count everywhere and made it unsigned int for consistency. |
02c335c23bf5fa225a467c19f2c063fb0dc7b8c3 |
|
12-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: freshen copyright
git ls-files | xargs perl -p -i -e 's/(\d+)-201[0-5]/$1-2016/g;s/ (201[0-5]) Dovecot/ $1-2016 Dovecot/' |
7cb128dc4cae2a03a742f63ba7afee23c78e3af0 |
|
05-Jan-2015 |
Phil Carmody <phil@dovecot.fi> |
global: freshen copyright
Robomatically:
git ls-files | xargs perl -p -i -e 's/(\d+)-201[0-4]/$1-2015/g;s/ (201[0-4]) Dovecot/ $1-2015 Dovecot/'
Happy 2015 everyone!
Signed-off-by: Phil Carmody <phil@dovecot.fi> |
42b087dcb4cbaff7b44e53188940ee6ab6ba6f28 |
|
13-Nov-2014 |
Timo Sirainen <tss@iki.fi> |
lib: ostream-file checks "sendfile() not supported" a bit better.
There are other reasons why stream_errno=EINVAL could have been set, at
least in theory. |
a34d06ac672ad0e4f8a25f47ef96f99ada4362c0 |
|
09-Oct-2014 |
Timo Sirainen <tss@iki.fi> |
lib: o_stream_send_istream() shouldn't ignore EINTRs for file ostreams.
Also added extra asserts to make sure that either we return an error or we
write everything from input stream to output stream. This should make it
safe to write to files using just:
if (o_stream_send_istream(ostream, istream) < 0) {
// failed
} else {
// everything in istream was written to ostream
} |
36ec5b36b6604d64b6c36a0c9fb937145e240f5e |
|
11-Aug-2014 |
Timo Sirainen <tss@iki.fi> |
Compiler warning fix |
46631c1d903c409444b1b1c4a1d41a033c09ee37 |
|
11-Aug-2014 |
Timo Sirainen <tss@iki.fi> |
lib: io_stream_copy() no longer attempts to read full block sizes from input.
Although that may be more efficient for writing (to files), it causes
unnecessary work for the input stream. The writing part should also be
optimized anyway if the caller corks the output stream. |
43834f87bf431198f986e86052a4f6e558fdb07d |
|
13-Jun-2014 |
Timo Sirainen <tss@iki.fi> |
lib: Added [io]_stream_create_fd_*autoclose()
These make it clearer that the fd parameter will be closed automatically
when the stream is closed.
Eventually (in v2.3) we'll want to get rid of the autoclose boolean
parameter in [io]_stream_create_fd(). |
a8c5a86d183db25a57bf193c06b41e092ec2e151 |
|
04-Feb-2014 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2014. |
1c6f6f5bef70f16546b3bc8f4cd5f93f373e82a2 |
|
19-Sep-2013 |
Timo Sirainen <tss@iki.fi> |
iostreams: Set stream error string when it provides extra information. |
e2ce8d4a6ac5d82a906178148453e7613fab9ba0 |
|
13-Mar-2013 |
Timo Sirainen <tss@iki.fi> |
iostreams: Added close_parent flag to close() handler and clarified close/destroy APIs.
This makes it unambiguous how things work: Unless you explicitly call
[io]_stream_close(), the parent streams won't be closed. This is what most
(hopefully all!) of the existing code expects.
I was wondering a bit if [io]_stream_destroy() should simply have been
removed and replaced with [io]_stream_unref() calls, since they would have
worked basically everywhere, but there might be some places where it's
better to have explicitly closed the stream (and where closing the parent
stream doesn't matter). |
e0ec84491d72acab8adcaa41cbaea2f01c9123b3 |
|
24-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
o_stream_send_istream(): Fixed copying when [io]streams neither have usable fds. |
5a580c3a38ced62d4bcc95b8ac7c4f2935b5d294 |
|
02-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
Oops :) Update copyrights to 2013 without breaking all .c files. |
cca4ba2a504d70a9fe9fee37f8433997359de52c |
|
02-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2013. |
456127254258721062ddb1b0c16b7dd14f8c4bfe |
|
09-Jan-2013 |
Timo Sirainen <tss@iki.fi> |
o_stream_send_istream(): Fixed copying within same file, when istream's size is unknown.
This fixes copying a mail from mdbox's m.* file to the end of the same file. |
bdd36cfdba3ff66d25570a9ff568d69e1eb543cf |
|
03-Oct-2012 |
Timo Sirainen <tss@iki.fi> |
Renamed network.[ch] to net.[ch].
The function prefixes already started with net_ instead of network_.
And icecap wants to use network.h for other purpose. :) |
0fe713fb1dcfe4c5a7905dd1d0fb2e68e9066e35 |
|
28-Aug-2012 |
Timo Sirainen <tss@iki.fi> |
o_stream_send_istream(): Get input stream size with i_stream_get_size() instead of _stat(). |
a2ecf3b488c8b7531c1f4af9e586605f6056135e |
|
18-Aug-2012 |
Timo Sirainen <tss@iki.fi> |
ostream-file: Fixed writing with zero buffer size. |
8b247780e911909a9fdc47f69ce6d1478902ad98 |
|
11-Aug-2012 |
Timo Sirainen <tss@iki.fi> |
Added o_stream_get_fd(). |
e2a88d59c0d47d63ce1ad5b1fd95e487124a3fd4 |
|
24-Jun-2012 |
Timo Sirainen <tss@iki.fi> |
Added o_stream_nsend*() and related functions to make delayed error handling safer.
Once o_stream_nsend*() is called, o_stream_nfinish() must be called before
stream is destroyed to finish checking if there were any errors. If
something failed and the stream is just wanted to be closed,
o_stream_ignore_last_errors() can be called.
For streams where errors don't really make any difference (network sockets)
you can call o_stream_set_no_error_handling() immediately after creating the
stream. |
5f5870385cff47efd2f58e7892f251cf13761528 |
|
12-Feb-2012 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2012. |
e3678f7bfba87b5aa1446a1a7b9928272b4f72a3 |
|
21-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
Simplified creating filter ostreams. |
0536ccb51d41e3078c3a9fa33e509fb4b2420f95 |
|
21-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
Renamed lib/*-internal.h files to lib/*-private.h for consistency. |
71da447014454c84828d9dface77219875554d7d |
|
07-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
Added o_stream_switch_ioloop() and implemented it to all ostreams. |
2e37d45867d081db150ab78dad303b9077aea24f |
|
04-Mar-2011 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2011. |
183bea41fa640dc8117f3eb45ff935cd81377a84 |
|
04-Mar-2011 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2011. |
08baf8e4f38f6e5858b16e954e1841675cecae0c |
|
18-Oct-2010 |
Timo Sirainen <tss@iki.fi> |
ostream-file: Fixed potential crash in write_at() and also fixed attempted optimization. |
3ed2d0f6b5e67e2663d44489d9da3176823789a8 |
|
14-May-2010 |
Timo Sirainen <tss@iki.fi> |
Use IO_BLOCK_SIZE macro to specify how large read/write syscalls to use.
--HG--
branch : HEAD |
8cb72c59d5ea4e9e5f638d7ec840bb853f5a188e |
|
06-Mar-2010 |
Timo Sirainen <tss@iki.fi> |
i/ostreams can now have a name (e.g. file path).
--HG--
branch : HEAD |
214b18002f289c15b4e48fef537a79db312c9d0f |
|
14-Feb-2010 |
Timo Sirainen <tss@iki.fi> |
ostream: If cork method isn't implemented, keep track of corking state internally.
--HG--
branch : HEAD |
e59faf65ce864fe95dc00f5d52b8323cdbd0608a |
|
25-Jan-2010 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2010.
--HG--
branch : HEAD |
8f32e59200da904613506f5649ffa4d9f5989ceb |
|
16-Oct-2009 |
Timo Sirainen <tss@iki.fi> |
ostream: Simplified implementing ostreams.
Some functions are no longer necessary to implement. Moved some code to be
common among all ostreams.
--HG--
branch : HEAD |
8ab3d88c56dff2f567193f80cc29821a64e576d1 |
|
30-Jun-2009 |
Timo Sirainen <tss@iki.fi> |
ostreams: Moved generic o_stream_send_istream() implementation to ostream.c.
--HG--
branch : HEAD |
da2aa032ccfa8e7e4a4380ef738014549f4d2c2d |
|
28-Jun-2009 |
Timo Sirainen <tss@iki.fi> |
Added struct istream.readable_fd, which is used to determine if sendfile() can be used.
--HG--
branch : HEAD |
567ecccc6e6c3ef26f34fdb67a301dea95419c4c |
|
19-May-2009 |
Timo Sirainen <tss@iki.fi> |
o_stream_send_istream(): Make sure istream->eof gets set after sending everything with sendfile().
--HG--
branch : HEAD |
8cdb3234fe3c77e477c7a0e6934678f58fc54d4d |
|
25-Feb-2009 |
Timo Sirainen <tss@iki.fi> |
Added o_stream_pwrite().
--HG--
branch : HEAD |
52b34f874a22615c67a9e1a1ee1679153559e377 |
|
25-Feb-2009 |
Timo Sirainen <tss@iki.fi> |
o_stream_send_istream(): Don't do backwards copying if the area doesn't really overlap.
--HG--
branch : HEAD |
4f23804c4dc2b2e307287f78e3c82403ab801ffb |
|
25-Feb-2009 |
Timo Sirainen <tss@iki.fi> |
ostream: When copying backwards within a file, update in/outstream offsets.
--HG--
branch : HEAD |
3f072ebbd4152514e4fc54ac42da535af290359b |
|
25-Feb-2009 |
Timo Sirainen <tss@iki.fi> |
ostream: When copying backwards within a file, update in/outstream offsets.
--HG--
branch : HEAD |
45312f52ff3a3d4c137447be4c7556500c2f8bf2 |
|
06-Jan-2009 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2009.
--HG--
branch : HEAD |
00a76ff608feae6b7f33b3b9711155da4bb55338 |
|
30-Aug-2008 |
Timo Sirainen <tss@iki.fi> |
ostream: Make sure writing to files always fully succeeds or fails.
Don't allow partial writes (to NFS).
--HG--
branch : HEAD |
68a4946b12583b88fa802e52ebee45cd96056772 |
|
20-Jun-2008 |
Timo Sirainen <tss@iki.fi> |
Added more consts, ATTR_CONSTs and ATTR_PUREs.
--HG--
branch : HEAD |
76b43e4417bab52e913da39b5f5bc2a130d3f149 |
|
01-Jan-2008 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2008.
--HG--
branch : HEAD |
bad44d7239e5d1163aadff48ea8ca96d01ed1561 |
|
29-Dec-2007 |
Timo Sirainen <tss@iki.fi> |
If writev() fails for non-file and nothing was sent, return failure instead
of ignoring the error.
--HG--
branch : HEAD |
54c7c11b95b2477e6536ac101ceac1f3617e93c3 |
|
24-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
Handle write failures with files better.
--HG--
branch : HEAD |
53cd46dd843c22f21f7e6efcc52a3e0f76cd1e52 |
|
24-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
Moved stream_errno clearing to common functions in ostream.c.
--HG--
branch : HEAD |
d3cefff6d47eafb852eff354b255dbed75dac96b |
|
24-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
Assert: With files o_stream_send*() must either write everything or return
an error.
--HG--
branch : HEAD |
00cc2366552862bffba4f4eb53bb83b53193c281 |
|
08-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
o_stream_send_istream(): Don't fstat() the stream unless we have to.
--HG--
branch : HEAD |
89a126810703c666309310d0f3189e9834d70b5b |
|
16-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
Replaced my Copyright notices. The year range always ends with 2007 now.
My name was replaced with "Dovecot authors". In many cases I didn't really
even own the copyright, so this is more correct.
--HG--
branch : HEAD |
a94936bafd127680184da114c6a177b37ff656e5 |
|
16-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
Removed _ prefixes from function names.
--HG--
branch : HEAD |
252db51b6c0a605163326b3ea5d09e9936ca3b29 |
|
15-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
Renamed struct _[io]stream to struct [io]stream_private. Also removed _
prefix from _[io]stream_*() functions.
--HG--
branch : HEAD |
a3bb6a4553257f9ee3ff025d616ee43af5a7f655 |
|
09-Aug-2007 |
Timo Sirainen <tss@iki.fi> |
Assert fix
--HG--
branch : HEAD |
5cbb864f29e1d752afcd81257c3d5da74dfee6c4 |
|
09-Aug-2007 |
Timo Sirainen <tss@iki.fi> |
If we do multiple writev() calls and the last one fails, we shouldn't treat
all of it as a failure because some data was already sent. Also added some
more asserts.
--HG--
branch : HEAD |
521c07269be3ee2d22b71e98fc4714a76ba6a63b |
|
02-Aug-2007 |
Timo Sirainen <tss@iki.fi> |
Delayed lseek()/pwrite() fixes.
--HG--
branch : HEAD |
51ee6110db9b548dd078235945751ed5cd55f52c |
|
02-Aug-2007 |
Timo Sirainen <tss@iki.fi> |
Delay lseek()s and use pwrite() whenever possible.
--HG--
branch : HEAD |
93fa87cf1a96c4f279ec4f5c311820313ba12c34 |
|
02-Aug-2007 |
Timo Sirainen <tss@iki.fi> |
Split o_stream_create_file() to _create_fd() and _create_fd_file().
--HG--
branch : HEAD |
fe363b433b8038a69b55169da9dca27892ad7d18 |
|
24-Jul-2007 |
Timo Sirainen <tss@iki.fi> |
Removed memory pool parameter from iostreams. Default pool was almost always
used, and the stream usually required destroying anyway so it didn't even
make freeing memory easier.
--HG--
branch : HEAD |
9ece98838235a8ac52ca496d6fbf7675a2ac2caa |
|
20-Dec-2006 |
Timo Sirainen <tss@iki.fi> |
Delay setting the TCP cork until something is actually sent to the
network.
--HG--
branch : HEAD |
2cfe9983ce7a6280636ee12beccc2e865111967b |
|
15-Dec-2006 |
Timo Sirainen <tss@iki.fi> |
Replaced void *context from a lot of callbacks with the actual context
type. Also added/fixed some context type checks.
--HG--
branch : HEAD |
afe74c261e388f64cb2e7b661b1f7b9916013e43 |
|
19-Nov-2006 |
Timo Sirainen <tss@iki.fi> |
If connection is closed while buffer is being flushed in uncorking, don't
assert-crash.
--HG--
branch : HEAD |
2c25e1360d4b5cc55eda969a3a7204d950de5a8f |
|
07-Nov-2006 |
Timo Sirainen <tss@iki.fi> |
When i/ostream is closed, change the fd to be -1 so it won't be accidentally
used.
--HG--
branch : HEAD |
882cd61c2bd667e06cfe274a1697c766c44a598b |
|
02-Apr-2006 |
Timo Sirainen <tss@iki.fi> |
If output flush callback closed the stream, don't add another flush I/O
handler to it even if there would still be something to flush.
--HG--
branch : HEAD |
62d1665ff7842b61bc99be238ede3921ec08ccc5 |
|
29-Jan-2006 |
Timo Sirainen <tss@iki.fi> |
Call io_remove() before closing the fd. It's required by kqueue.
--HG--
branch : HEAD |
d5cebe7f98e63d4e2822863ef2faa4971e8b3a5d |
|
14-Jan-2006 |
Timo Sirainen <tss@iki.fi> |
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.
--HG--
branch : HEAD |
6ef7e31619edfaa17ed044b45861d106a86191ef |
|
13-Jan-2006 |
Timo Sirainen <tss@iki.fi> |
Added "bool" type and changed all ints that were used as booleans to bool.
--HG--
branch : HEAD |
b01ba2976e9fa9662627e1ea8c9694c6ffe91713 |
|
19-Oct-2005 |
Timo Sirainen <tss@iki.fi> |
Revert previous "cleanup" which broke things.. Added a comment.
--HG--
branch : HEAD |
ff8e19fc13a1fa1808a0592304dffdf012f4fb74 |
|
16-Oct-2005 |
Timo Sirainen <tss@iki.fi> |
Cleanup
--HG--
branch : HEAD |
7068828de25f53831b51cd27ee9cd8c6181ac63f |
|
15-Oct-2005 |
Timo Sirainen <tss@iki.fi> |
Removed accidentally committed debug errors.
--HG--
branch : HEAD |
7d207b1e77a7b5e3fda640e353acfc86d261fedf |
|
08-Oct-2005 |
Timo Sirainen <tss@iki.fi> |
Added exact parameter to i_stream_stat()
--HG--
branch : HEAD |
62355fdb8b7c5fb4ed1b28433bc7df718407e2c6 |
|
27-Sep-2005 |
Timo Sirainen <tss@iki.fi> |
Use IOV_MAX instead of UIO_MAXIOV when available.
--HG--
branch : HEAD |
0ce5f96804e81cb0f857e7df32c0272f1eed9377 |
|
25-Sep-2005 |
Timo Sirainen <tss@iki.fi> |
Changed iov_count to be unsigned int, it's large enough. Added overflow-flag
which gets sent if send() failed to both send and buffer the given data.
--HG--
branch : HEAD |
bac6a4bc26813a7173e17586f272a25f2e8839eb |
|
29-May-2005 |
Timo Sirainen <tss@iki.fi> |
Set output I/O handler after output callback if needed.
--HG--
branch : HEAD |
533f94a79dd1225622f6a3a1c2a0e1f09e3c6afe |
|
28-May-2005 |
Timo Sirainen <tss@iki.fi> |
Don't remove output handler if flush_pending is still set after callback.
--HG--
branch : HEAD |
ae13c0f3484884d2ac83992b5fed040e67ff727a |
|
25-May-2005 |
Timo Sirainen <tss@iki.fi> |
Don't forget o_stream_set_flush_pending() call if it's called in flush
callback which returns 1.
--HG--
branch : HEAD |
5648f13571ebdff7457327ec277241329e0cc6cd |
|
26-Apr-2005 |
Timo Sirainen <tss@iki.fi> |
Try to flush output before uncorking
--HG--
branch : HEAD |
5238111c460098d9cc8cc22527026138a278b9a4 |
|
26-Apr-2005 |
Timo Sirainen <tss@iki.fi> |
o_stream_uncork() was previously always setting IO_WRITE handler even if
there was no reason for it. This was relied on in imap/pop3 code when a
handler could just send as much data as it can without actually buffering
anything.
So, removed the IO_WRITE handler forcing. It's only set if there's actually
data in buffer or if flush_pending is set (via o_stream_set_flush_pending()
or by returning 0 from flush callback handler).
All in all, a minor optimization.
--HG--
branch : HEAD |
07e4875d250e7a7157cd99132aafc773cf3cdf83 |
|
29-Mar-2005 |
Timo Sirainen <tss@iki.fi> |
Replaced i_stream_get_size() with i_stream_stat(). Added i_stream_sync().
--HG--
branch : HEAD |
3bbe99d30871f49610aac0417ee5951d1e740b98 |
|
27-Mar-2005 |
Timo Sirainen <tss@iki.fi> |
Added pool_get_exp_grown_size(). Use it for buffers, istreams and ostreams
when buffer needs to grow. Optimizes memory usage a bit.
--HG--
branch : HEAD |
aa53b2ab36519f431a1398e86c31efafc9cf6243 |
|
17-Dec-2004 |
Timo Sirainen <tss@iki.fi> |
Go back to the version before recent changes. It was correct all the time.
--HG--
branch : HEAD |
72e415d6107f270c8001546b35e1d4e0a66528b0 |
|
16-Dec-2004 |
Timo Sirainen <tss@iki.fi> |
o_stream_send_istream() was broken and could have just caused copying to be
done infinitely filling up disk.
--HG--
branch : HEAD |
ad74cbbc63d04551fb2ef851aeda7ae9d868f50c |
|
16-Dec-2004 |
Timo Sirainen <tss@iki.fi> |
Stream copying skipped too much input if the output buffer wasn't empty when
it was called.
--HG--
branch : HEAD |
211ed7806d8715ec2280ffbf5d10f0d6e4f1beb2 |
|
20-Oct-2004 |
Timo Sirainen <tss@iki.fi> |
Changed ostream's flush callback to have return value which can tell if
there are more bytes to be sent even if there is none in output buffer
itself. Fixes FETCH commands which used o_stream_send_istream() getting
stuck.
--HG--
branch : HEAD |
0c76025bc92863090603ad923a1d0d0a034d42a4 |
|
16-Oct-2004 |
Timo Sirainen <tss@iki.fi> |
Growing output buffer size broke the data inside it.
--HG--
branch : HEAD |
bf3b9597ec2de95b551e5b4a552073b654fb63c1 |
|
15-Oct-2004 |
Timo Sirainen <tss@iki.fi> |
Don't use sendfile() for files, even with Linux. 2.6 kernels don't support
it anymore and I'm not sure anymore if it fully worked with 2.4 either.
--HG--
branch : HEAD |
afb248d8805cf97c5648839cb7c489a01d5a5da8 |
|
08-Oct-2004 |
Timo Sirainen <tss@iki.fi> |
Don't do anything in cork() if stream is closed.
--HG--
branch : HEAD |
547644adb09654c2d24f3ef7bcf00d100ca67f22 |
|
22-Sep-2004 |
Timo Sirainen <tss@iki.fi> |
When corked, don't limit buffer size to optimal_block_size. Fixes problems
with some command replies not being sent completely with IMAP, or crashes
with pop3.
--HG--
branch : HEAD |
597dc664bf43514b81d88c358a7da3d030204436 |
|
20-Sep-2004 |
Timo Sirainen <tss@iki.fi> |
If we couldn't send any bytes, don't reset buffer's full-flag.
--HG--
branch : HEAD |
d602df4d0bd2135f0e0aa444005265f3e6398fca |
|
16-Sep-2004 |
Timo Sirainen <tss@iki.fi> |
o_stream_send_istream() was buggy if input stream's offset wasn't 0 or if
sendfile() couldn't be used. Fixes problems with sending large mails.
--HG--
branch : HEAD |
4c52424aaaa0e1ad5a63a5e5540767634f207806 |
|
03-Sep-2004 |
Timo Sirainen <tss@iki.fi> |
Added assert
--HG--
branch : HEAD |
aefc6d07666b56b7b030207729481027b3e98d00 |
|
02-Sep-2004 |
Timo Sirainen <tss@iki.fi> |
_send_istream() might have crashed.
--HG--
branch : HEAD |
da5f36044731c6bceb66a6e41547262120d6a265 |
|
30-Aug-2004 |
Timo Sirainen <tss@iki.fi> |
Output stream sometimes duplicated data and sometimes lost data.
--HG--
branch : HEAD |
b7b88a3b95d400b8da1d28086d7eb12a0fe2c596 |
|
23-Aug-2004 |
Timo Sirainen <tss@iki.fi> |
o_stream_send*() might have returned wrong value
--HG--
branch : HEAD |
1b3ba631030085c5f5afdae503909cee9c192f96 |
|
23-Aug-2004 |
Timo Sirainen <tss@iki.fi> |
o_stream_sendv() returned wrong value if sending more than UIO_MAXIOV
iovecs.
--HG--
branch : HEAD |
42420d66241ee257aebf89a53e8f03512d4d46bb |
|
22-Aug-2004 |
Timo Sirainen <tss@iki.fi> |
Limit iovec count to UIO_MAXIOV for writev() calls.
--HG--
branch : HEAD |
2767104d81e97a109f0aa9758792bfa1da325a97 |
|
15-Aug-2004 |
Timo Sirainen <tss@iki.fi> |
We never do blocking reads/writes to network anymore. Changed imap and pop3
processes to use a single I/O loop.
Not much tested yet, and currently LIST/LSUB may eat too much memory and
APPEND eats all CPU.
--HG--
branch : HEAD |
9b7eeffb5752b500ac62ba1fd01c4a8c4ada14e9 |
|
28-Jun-2004 |
Timo Sirainen <tss@iki.fi> |
Allow giving 0 max_buffer_size, in which case "optimal" size is used.
--HG--
branch : HEAD |
f76b60ba122e9defdc3dd75c38c2ae4b66ff76a7 |
|
26-May-2004 |
Timo Sirainen <tss@iki.fi> |
struct iovec->iov_base may not be defined as void*. add casts to avoid
compiler warnings.
--HG--
branch : HEAD |
8a3d0935fb63a7e8e4b07f43471a24f8d063204f |
|
23-May-2004 |
Timo Sirainen <tss@iki.fi> |
o_stream_send_istream() fix
--HG--
branch : HEAD |
dd62b77c932d1b518f2a3e4bf80e36542becc256 |
|
09-Nov-2003 |
Timo Sirainen <tss@iki.fi> |
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.
--HG--
branch : HEAD |
6449bd276af37b3e0b81a9c47ecd01f39a2cba53 |
|
05-Nov-2003 |
Timo Sirainen <tss@iki.fi> |
Added istream->eof. istream->v_size is now set to 0 with files.
--HG--
branch : HEAD |
acc2e62417a5c0b950ac0a0bb5a473f6baf058b2 |
|
21-Oct-2003 |
Timo Sirainen <tss@iki.fi> |
removed unused #include
--HG--
branch : HEAD |
5e0ce63bb65db34d7f48b34bbb5545fa791781c4 |
|
26-Aug-2003 |
Timo Sirainen <tss@iki.fi> |
Removed most of the license comments from src/lib/*.c. It's just fine to
keep them in a single COPYING.MIT file. Changed a few other comments as well.
--HG--
branch : HEAD |
007d354a674fb3ddf49db160cf050cf61270a1a0 |
|
23-May-2003 |
Timo Sirainen <tss@iki.fi> |
Removed I/O priorities. They were pretty much useless and were just getting
in way.
--HG--
branch : HEAD |
06026bca01ece26c9bfe68d9e9515a49f37cbc76 |
|
19-May-2003 |
Timo Sirainen <tss@iki.fi> |
fixes
--HG--
branch : HEAD |
add0787ff25739f76d04358bb9b9b241836eabdb |
|
16-May-2003 |
Timo Sirainen <tss@iki.fi> |
Automatically set file streams to blocking and don't try to io_add() them.
--HG--
branch : HEAD |
0e88f0a214ea86055cdfd2ae4105afbb6aba8119 |
|
16-May-2003 |
Timo Sirainen <tss@iki.fi> |
Don't try to cork files.
--HG--
branch : HEAD |
8f779ebb9bf521299500f55a6273e38869480f45 |
|
09-Apr-2003 |
Timo Sirainen <tss@iki.fi> |
Call safe_sendfile() only with sockets, and also with files under Linux.
Hopefully helps for signal 12 under FreeBSD.
--HG--
branch : HEAD |
875847d4c19127b416c1eb2928cf0600f6f8a0a5 |
|
17-Mar-2003 |
Timo Sirainen <tss@iki.fi> |
file offset wasn't kept right.
--HG--
branch : HEAD |
e14a2f23a1dcfd89ce9bcb122b375cc0355bc513 |
|
24-Feb-2003 |
Timo Sirainen <tss@iki.fi> |
Try to use optimal block sizes when writing to files.
--HG--
branch : HEAD |
850da42142c8cb755f5154a161f32c1b0bac506d |
|
21-Feb-2003 |
Timo Sirainen <tss@iki.fi> |
if connection was closed while trying to write data to client, we sometimes
crashed. also errno wasn't saved.
--HG--
branch : HEAD |
bba9618423845788b418f3a2e219c3b69a30142b |
|
20-Feb-2003 |
Timo Sirainen <tss@iki.fi> |
ostream: get initial offset. flush buffer before seeking.
--HG--
branch : HEAD |
b8f0cfc091e9d190c1e152a716393f39a0f4b0ad |
|
19-Feb-2003 |
Timo Sirainen <tss@iki.fi> |
sendfile bugfix
--HG--
branch : HEAD |
03f5c621d06d6b6d77a145196c9633a7aa64dc78 |
|
19-Feb-2003 |
Timo Sirainen <tss@iki.fi> |
o_stream_send_istream() is now safe to use for moving data within file.
--HG--
branch : HEAD |
af81f402ddc897c74c1e85abd02879612ce44882 |
|
11-Feb-2003 |
Timo Sirainen <tss@iki.fi> |
Bugfixes to handling >2GB files.
--HG--
branch : HEAD |
07a8b16dfd661154dcbfdd11492b1238af65f751 |
|
08-Feb-2003 |
Timo Sirainen <tss@iki.fi> |
Don't bother trying sendfile() more than once with the stream.
--HG--
branch : HEAD |
7013075e208bc7aa87257df7d9664c84c7c220f3 |
|
27-Jan-2003 |
Timo Sirainen <tss@iki.fi> |
Removed useless parameters from io_callback_t and timeout_callback_t.
--HG--
branch : HEAD |
f923659c0e5298263d80622c99f4dc4132b4675b |
|
11-Jan-2003 |
Timo Sirainen <tss@iki.fi> |
Naming change for function typedefs.
--HG--
branch : HEAD |
01af88dfbb7a022ddb3ab9fb4159f2a4a204ead3 |
|
10-Jan-2003 |
Timo Sirainen <tss@iki.fi> |
Added old_size parameter to p_realloc() - we rarely need it and this way
each allocation takes 8 bytes less memory.
--HG--
branch : HEAD |
3a30e5e6ca0473fbaf5eb243fd1cccb1e227c630 |
|
08-Jan-2003 |
Timo Sirainen <tss@iki.fi> |
Minor speed optimizations
--HG--
branch : HEAD |
c0435c854a0e7246373b9752d163095cc4fbe985 |
|
05-Jan-2003 |
Timo Sirainen <tss@iki.fi> |
Naming style changes, finally got tired of most of the typedefs. Also the
previous enum -> macro change reverted so that we don't use the highest bit
anymore, that's incompatible with old indexes so they will be rebuilt.
--HG--
branch : HEAD |
5254d77805cd35b9356d072ba325c356c43b0d51 |
|
18-Dec-2002 |
Timo Sirainen <tss@iki.fi> |
Marked all non-trivial buffer modifications with @UNSAFE tag. Several
cleanups and a couple of minor bugfixes.
--HG--
branch : HEAD |
ecc81625167ed96c04c02aa190a1ea5baa65b474 |
|
06-Dec-2002 |
Timo Sirainen <tss@iki.fi> |
Renamed IBuffer and OBuffer to IStream and OStream which describes their
functionality better. I tried to keep the variable names and comments also
sensible.
--HG--
branch : HEAD |