bcb4e51a409d94ae670de96afb8483a4f7855294 |
|
01-Jan-2018 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
Updated copyright notices to include the year 2018. |
9a84b90d894a741ae6e090de104d31382a41d0aa |
|
01-Nov-2017 |
Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> |
global: start relying on [io]_stream_close(NULL) being a no-op
Cleanup performed with the following semantic patch (and a bit of
hand-editing):
@@
expression E;
@@
- if (E != NULL) {
- i_stream_close(E);
- }
+ i_stream_close(E);
@@
expression E;
@@
- if (E != NULL) {
- o_stream_close(E);
- }
+ o_stream_close(E); |
bcd286622779a93f809b11993db0550f8c7cc9b5 |
|
01-Nov-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: Use i_stream_read_memarea() wherever possible |
2974dca6be5120e49279f06c8aa952e5fac56048 |
|
01-Nov-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: Add flags parameter to i_stream_create() and set it to 0
This just changes the API - the following changes add the new flag. |
448ab3576e0def2135c6f4681bd412dd59425d44 |
|
01-Nov-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: istream-seekable - Implement snapshot() |
3e55775bc7a37ebc05e06c04cafb32eee9888e87 |
|
01-Nov-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: istream-seekable - Change to use i_stream_*alloc()
This simplifies implementing the snapshotting. |
3fe5eaeb32a8bbc31ce0673793b1c37f72d00d47 |
|
01-Nov-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: istream-seekable - Fix fd leak if initial temp file couldn't be read back
That should normally never happen. |
6307d76096764e66bddc63d4a3e5a1aa19cc528f |
|
19-Sep-2017 |
Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> |
global: start relying on buffer_free(NULL) being a no-op
Cleanup performed with the following semantic patch:
@@
expression E;
@@
- if (E != NULL) {
- buffer_free(&E);
- }
+ buffer_free(&E); |
204ee6ed414f5e4eeb6f6c10763b55daf56f11ac |
|
19-Sep-2017 |
Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> |
global: start relying on [io]_stream_unref(NULL) being a no-op
Cleanup performed with the following semantic patch:
@@
expression E;
@@
- if (E != NULL) {
- i_stream_unref(&E);
- }
+ i_stream_unref(&E);
@@
expression E;
@@
- if (E != NULL) {
- o_stream_unref(&E);
- }
+ o_stream_unref(&E); |
159de4e2ce3f541a9aa745d158b31203a40711e1 |
|
14-Jun-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: istream-seekable - Fix reading when parent stream's content is larger than max_buffer_size
When writing the parent stream to fd and trying to read it back, it would
try to enforce the max_buffer_size and fail with:
istream-seekable: Couldn't read back in-memory input ...: buffer full
But since the data was already in buffer, istream-seekable shouldn't try to
enforce it at this point anymore. |
2454dfa32c93c20a8522c6ed42fe057baaac9f9a |
|
01-Jan-2017 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
Updated copyright notices to include the year 2017. |
7f74811b78f8915e73dffc88bb49009e98b6846d |
|
09-Oct-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: Make sure i_stream_read() calls handle 0 and -2 return values correctly. |
17466c748183b19f7775374ce6afbd7bf62d479d |
|
19-Sep-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: Assert if i_stream_create_seekable_path(temp_path_prefix==NULL)
If the stream becomes large enough it would crash then in a callback
function, which makes debugging more difficult. |
31fc5ca967261b131646ff9719eb1fb23888ed1a |
|
13-May-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: Fixed istream_seekable.stat() to return correct size.
It was supposed to read until end of the stream, but it did it only when
stat() was called while stream was still fully in memory. |
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/' |
46b823ac3bce2c0f9f0fc73911e48d3a77b04fbe |
|
08-Sep-2015 |
Timo Sirainen <tss@iki.fi> |
Replaced unlink() calls with i_unlink*() wherever possible. |
d907b51d224e965a876eada6bc49455773e416e9 |
|
02-Mar-2015 |
Timo Sirainen <tss@iki.fi> |
lib: Added assert to i_stream_create_seekable*() to have non-zero max_buffer_size.
This size is used for the created fd istream and it can't be zero. |
ac6bba612af5207c24f6f02497d64b0ea03e7bbd |
|
02-Mar-2015 |
Timo Sirainen <tss@iki.fi> |
lib: Give a name for istream-seekable's temporary fd istream. |
b8c009e1639efa53eb9e70720f28ce137d493e5e |
|
15-Feb-2015 |
Timo Sirainen <tss@iki.fi> |
lib: If istream-seekable's parent stream returns error, make sure we set eof=TRUE |
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> |
9e406b04bb5bed7d73aeed375c40c6a3fea1a2cb |
|
24-Oct-2014 |
Timo Sirainen <tss@iki.fi> |
lib: Added "istream-seekable: " error message prefixes. |
bace943c67e6cd14ce6c994f533d82a3caad5bf1 |
|
13-Jun-2014 |
Timo Sirainen <tss@iki.fi> |
Use the new [io]_stream_create_fd_*autoclose() functions wherever possible. |
a8c5a86d183db25a57bf193c06b41e092ec2e151 |
|
04-Feb-2014 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2014. |
2c42748505ef4aed83ff59b34e50ed5606900c86 |
|
19-Sep-2013 |
Timo Sirainen <tss@iki.fi> |
istream-chain/concat/seekable: When child stream fails, copy its error to ourself. |
be51dfea768ad502e08ebd02917138f7a0f8f625 |
|
23-Apr-2013 |
Timo Sirainen <tss@iki.fi> |
istream-seekable: Don't crash when seeking forwards past the data we haven't read yet. |
8451cf67733f6633510f6619301474be349c5035 |
|
09-Apr-2013 |
Timo Sirainen <tss@iki.fi> |
istream-seekable: Fixed handling "buffer full" i_stream_read() result from underlying streams. |
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). |
c99c242ab54a53df73050c64abb641d7989fac9c |
|
26-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
istream-seekable: Don't forcibly close underlying streams when stream is destroyed.
The underlying streams may still have references and be reused for other
purposes. |
2a8b891366a3fc69524c2bb07f68d42c16223a56 |
|
04-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
istream-seekable: Fail stat() if stream_errno is set. |
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. |
8d56f3334e22619abf56833d290bb1f49ac6722c |
|
06-Nov-2012 |
Timo Sirainen <tss@iki.fi> |
istream-seekable: Underlying stream errors weren't handled correctly. |
81b1d14891415fef0c2f37ef1ef3680cdcc600f1 |
|
23-Oct-2012 |
Timo Sirainen <tss@iki.fi> |
istream-seekable: When read() reaches EOF, unreference underlying streams.
This was already done when the stream was kept in memory, but not when when
the stream was written to temporary file. |
01f4ee4a0243f3fe9af763e1a540cd5cff0d63f5 |
|
28-Aug-2012 |
Timo Sirainen <tss@iki.fi> |
i_stream_stat() API changed.
This fixes also one missing error check. |
c395e7d730eb4ee17e2b619acec487637a785110 |
|
20-Aug-2012 |
Timo Sirainen <tss@iki.fi> |
i_stream_create_seekable_path() created memory corruption |
6967fa47dde9f2726bd86019a50627dacf2d7509 |
|
18-Aug-2012 |
Timo Sirainen <tss@iki.fi> |
Added i_stream_create_seekable_path() |
f2b95f63ebdf77dba4dac938cf8c65c839f1067d |
|
11-Aug-2012 |
Timo Sirainen <tss@iki.fi> |
istream-seekable: Reverted unnecessary/broken changes from the previous patch. |
4d33a3133e8484ebd00f677f457cda82f1365b84 |
|
11-Aug-2012 |
Timo Sirainen <tss@iki.fi> |
Added istreams_merge(), which forces istream-seekable to be created. |
a6f281d078ed03d555802c1a8e15fefce80132dc |
|
11-Aug-2012 |
Timo Sirainen <tss@iki.fi> |
istream-seekable: When we reach EOF, unreference all the input streams. |
5702c81e2d788449c3bc207eb9c19e539458ad9e |
|
11-Aug-2012 |
Timo Sirainen <tss@iki.fi> |
istream-seekable: Minor code cleanup.
stream->buffer and sstream->buffer being two different things was a bit
confusing. |
032964c7cc6788188b63ae6270fc26cbd4a3ca26 |
|
29-Jun-2012 |
Timo Sirainen <tss@iki.fi> |
istreams: Added default seek() implementation for seekable streams. |
4307c886579381dbb1897ea1388ae6978c96f560 |
|
27-Jun-2012 |
Timo Sirainen <tss@iki.fi> |
Changed i_close_fd() API to set the fd to -1 after closing. |
cb78bd2ad54e402c1f53930b41e2295683bda90b |
|
25-Jun-2012 |
Timo Sirainen <tss@iki.fi> |
Replaced (void)close(fd) and close_keep_errno() with i_close_fd().
i_close_fd() preserves the errno and logs an error if the close() fails. |
3785910c303507db5f629684e6dde2cc7f83668e |
|
25-Jun-2012 |
Timo Sirainen <tss@iki.fi> |
Added i_stream_get_data_size(). Used it where possible. |
5f5870385cff47efd2f58e7892f251cf13761528 |
|
12-Feb-2012 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2012. |
9ec30d84a736a2d0726b600213dcf630ff28bdeb |
|
02-Feb-2012 |
Timo Sirainen <tss@iki.fi> |
istream-seekable: If we panic about stream not being seekable, log the stream name/offset. |
d10cb4d7a80571af21f776c65604442bf09b1765 |
|
29-Jan-2012 |
Timo Sirainen <tss@iki.fi> |
istream-concat: If EOF is already reached, use that size for stat().st_size |
c1d4780bc0c9017e8e5d366b81e4fad31174c0ad |
|
02-Oct-2011 |
Timo Sirainen <tss@iki.fi> |
istream-seekable: Memory leak fix. |
0536ccb51d41e3078c3a9fa33e509fb4b2420f95 |
|
21-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
Renamed lib/*-internal.h files to lib/*-private.h for consistency. |
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. |
156736910057b280cb9999d4c6c7221c4c80f5c2 |
|
09-Jan-2011 |
Timo Sirainen <tss@iki.fi> |
istream-seekable: Minor code cleanup. |
5297aa3ceddf3a4ecc09f49c832bc424eff8f906 |
|
08-Jan-2011 |
Timo Sirainen <tss@iki.fi> |
istream-seekable: Minor code cleanup. |
8cb72c59d5ea4e9e5f638d7ec840bb853f5a188e |
|
06-Mar-2010 |
Timo Sirainen <tss@iki.fi> |
i/ostreams can now have a name (e.g. file path).
--HG--
branch : HEAD |
e59faf65ce864fe95dc00f5d52b8323cdbd0608a |
|
25-Jan-2010 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2010.
--HG--
branch : HEAD |
7bcb308d0e13dfa48b483b0addccd889a77bb598 |
|
22-Dec-2009 |
Timo Sirainen <tss@iki.fi> |
istream-seekable: If we're immediately at EOF after copying buffer to file, don't corrupt the buffer.
--HG--
branch : HEAD |
1b9aae1cb53708b5a3d861b4db6ba96ac2eb35b4 |
|
26-Oct-2009 |
Timo Sirainen <tss@iki.fi> |
istream-seekable: Don't assert-crash when input buffer becomes full.
--HG--
branch : HEAD |
34830cefe1757de0ffca67acdc529d5bc8b06b66 |
|
15-Oct-2009 |
Timo Sirainen <tss@iki.fi> |
istream-seekable: If we can't write temp file, fallback to using memory without limits.
--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 |
fcca16701767c6b92227a9ee125de69d257882f6 |
|
26-May-2009 |
Timo Sirainen <tss@iki.fi> |
istream-seekable: Changed API to use a callback function to create the temp file.
--HG--
branch : HEAD |
64ae2f0ba5b94092f9edd439905c3272719c23c3 |
|
26-Feb-2009 |
Timo Sirainen <tss@iki.fi> |
istream-seekable: Don't add an extra "." after the given prefix.
--HG--
branch : HEAD |
45312f52ff3a3d4c137447be4c7556500c2f8bf2 |
|
06-Jan-2009 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2009.
--HG--
branch : HEAD |
c09f9f95db314e7482c95e502e1c56ed6c555797 |
|
13-Sep-2008 |
Timo Sirainen <tss@iki.fi> |
Input streams: Improved error handling and added more asserts.
--HG--
branch : HEAD |
fd6983e422e8c23fce618d0c27b17e0def3b1654 |
|
20-Jul-2008 |
Timo Sirainen <tss@iki.fi> |
istream-seekable: Log file creation error as creat() failure, not open().
--HG--
branch : HEAD |
76b43e4417bab52e913da39b5f5bc2a130d3f149 |
|
01-Jan-2008 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2008.
--HG--
branch : HEAD |
9511a40d933181045343110c8101b75887062aae |
|
22-Dec-2007 |
Timo Sirainen <tss@iki.fi> |
i_stream_create() now takes parent stream as parameter and internally sets
abs_start_offset correctly. Added parent_start_offset which is used by
filters instead of their own internal start_offset.
--HG--
branch : HEAD |
1fb8ce8b21d0616796ced699b1573b5dd0b61793 |
|
08-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
Stating seekable stream didn't restore read conditions correctly. Also it
returned broken values with larger streams.
--HG--
branch : HEAD |
4499995f7029bafd85094694b6a14752ea34c9b3 |
|
20-Oct-2007 |
Timo Sirainen <tss@iki.fi> |
If all streams are seekable, return a concat stream instead.
--HG--
branch : HEAD |
ab7b5b9286104974c2a572a499ccf8b56c5d2955 |
|
20-Oct-2007 |
Timo Sirainen <tss@iki.fi> |
Set blocking/seekable flags.
--HG--
branch : HEAD |
597dba3488c648ffb375ee4a552bd52ac4346979 |
|
20-Oct-2007 |
Timo Sirainen <tss@iki.fi> |
Always keep a usable value in stream->max_buffer_size.
--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 |
0f66f12eb4cdbf47670975044c88d8f388bf92df |
|
15-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
Changed buffer_free() and buffer_free_without_data() APIs to take ** pointer
which is set to NULL instead of hiding it with a macro.
--HG--
branch : HEAD |
43d32cbe60fdaef2699d99f1ca259053e9350411 |
|
16-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
Renamed __attr_*__ to ATTR_*. Renamed __attrs_used__ to ATTRS_DEFINED.
--HG--
branch : HEAD |
2526d52441ef368215ab6bf04fd0356d3b09d235 |
|
02-Aug-2007 |
Timo Sirainen <tss@iki.fi> |
Renamed i_stream_create_file() to i_stream_create_fd().
--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 |
8255a22cccf3b0ccf38206c594941820ac1c9e00 |
|
26-Jan-2007 |
Timo Sirainen <tss@iki.fi> |
cleanup
--HG--
branch : HEAD |
4da70fe8c9cb6e57b36103d78ab1e9c8654f76d9 |
|
08-May-2006 |
Timo Sirainen <timo.sirainen@movial.fi> |
If parent stream's read() returned -2, we returned -1 instead of the -2.
--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 |
7d207b1e77a7b5e3fda640e353acfc86d261fedf |
|
08-Oct-2005 |
Timo Sirainen <tss@iki.fi> |
Added exact parameter to i_stream_stat()
--HG--
branch : HEAD |
602a0434db30d8e3292d1c161a803d96a879a74f |
|
30-Sep-2005 |
Timo Sirainen <tss@iki.fi> |
Added i_stream_seek_mark() and used it
--HG--
branch : HEAD |
7efee0bb408b0d5253e41997857bdda57855cdc7 |
|
28-May-2005 |
Timo Sirainen <tss@iki.fi> |
Seekable stream was broken after its memory limit was reached and it started
using temporary file.
--HG--
branch : HEAD |
5069adb2f5b3609fff9a0a705c6edeae56e0030a |
|
23-Apr-2005 |
Timo Sirainen <tss@iki.fi> |
Allow non-first streams also to have pending data.
--HG--
branch : HEAD |
8d235b34022f0bf0f7db54fdbda2d4fd204ed864 |
|
23-Apr-2005 |
Timo Sirainen <tss@iki.fi> |
Fixes.
--HG--
branch : HEAD |
2201e2cc1b3f744dac61c2bf8095bcb6b5719540 |
|
29-Mar-2005 |
Timo Sirainen <tss@iki.fi> |
Added istream-seekable, which allows combining multiple input streams and
creating a single seekable stream out of them.
--HG--
branch : HEAD |