bcb4e51a409d94ae670de96afb8483a4f7855294 |
|
01-Jan-2018 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
Updated copyright notices to include the year 2018. |
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. |
f363414461e991a478d015861344974714620f3b |
|
05-Oct-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: istream-file - set blocking=TRUE automatically for blocking sockets
This fixes it to be correct with various doveadm commands. |
03915cfec4eb1b5a65e5b6b676c8f4151bc80351 |
|
05-Oct-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: istream-file/unix - don't ignore EINTR for blocking istream reads
Just fail the istream read entirely. Although there's a small possibility
that this interrupt was unwanted and should be retried, it's more likely
that a blocking istream is hanging and admin wants to stop the process.
If the EINTR is ignored all the time, it's not possible to abort a
blocking read with ^C or anything else than SIGKILL. |
2454dfa32c93c20a8522c6ed42fe057baaac9f9a |
|
01-Jan-2017 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
Updated copyright notices to include the year 2017. |
abb404575a238f27ea03b6049880f30f1656ddc4 |
|
13-Sep-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
Added asserts to make static analyzer happier. |
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. |
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/' |
e17d72cec1c75554483d692edd687b411526f312 |
|
29-Jun-2015 |
Timo Sirainen <tss@iki.fi> |
lib: istream_file.stat() fails, set stream_errno and error string.
For now we'll also keep logging the error since everybody isn't using
i_stream_get_error(). |
bf132be3fe1c9e8de84f10d0b05c0b46ca542ac4 |
|
25-Apr-2015 |
Timo Sirainen <tss@iki.fi> |
lib: Added istream-unix for reading fd sockets via istream. |
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> |
5024c4799b324ea15270152b775c67ccfc72d5bc |
|
29-Sep-2014 |
Timo Sirainen <tss@iki.fi> |
lib: Improved istream-file's failing read()/pread() error message. |
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. |
9f131c8b6d88ffc65d94eae63e0b3c11d7c24cb9 |
|
19-Sep-2013 |
Timo Sirainen <tss@iki.fi> |
istream-file: Assert-crash if read() fails with EBADF.
Something's already wrong at that point and it may not be safe to continue.
Also crashing makes it easier to debug such situation. |
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). |
30c795b3ee48d753b75b2db8bfd4b88792017122 |
|
10-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
i_stream_sync() for file should reset eof flag immediately. |
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. |
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. :) |
01f4ee4a0243f3fe9af763e1a540cd5cff0d63f5 |
|
28-Aug-2012 |
Timo Sirainen <tss@iki.fi> |
i_stream_stat() API changed.
This fixes also one missing error check. |
9a755930537f13e9746c4fc8c1bc42a83e52275e |
|
29-Jun-2012 |
Timo Sirainen <tss@iki.fi> |
istreams: Set (file), (fd) or (buffer) as default name for those input streams. |
dd2df6a67f10792ce31a3666197c0b6885893a3a |
|
28-Jun-2012 |
Timo Sirainen <tss@iki.fi> |
istreams: Renamed i_stream_get_buffer_space() to i_stream_try_alloc() |
5f5870385cff47efd2f58e7892f251cf13761528 |
|
12-Feb-2012 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2012. |
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. |
334fcad698ed0fd1319c5350eb3f7bcf9da242bf |
|
15-Nov-2010 |
Timo Sirainen <tss@iki.fi> |
istream-file: Minor error message fix. |
331b4805d76c0b3a5a38a560276f3cf110f55ba0 |
|
12-Aug-2010 |
Timo Sirainen <tss@iki.fi> |
i_stream_create_fd(): If opening a directory, set stream_errno=EISDIR |
09801f106cd531a28b4e03ec665e44c421264560 |
|
15-Jul-2010 |
Timo Sirainen <tss@iki.fi> |
Added i_stream_create_file() for creating istream from lazily opened file. |
8cb72c59d5ea4e9e5f638d7ec840bb853f5a188e |
|
06-Mar-2010 |
Timo Sirainen <tss@iki.fi> |
i/ostreams can now have a name (e.g. file path).
--HG--
branch : HEAD |
4ae354df6e08998137b527f495bfaaf3daf9eddc |
|
28-Feb-2010 |
Timo Sirainen <tss@iki.fi> |
file istream: If trying to seek backwards in unseekable stream, panic.
The previous way of just setting an error flag was getting ignored too
easily and causing silent corruption in such situations.
--HG--
branch : HEAD |
e59faf65ce864fe95dc00f5d52b8323cdbd0608a |
|
25-Jan-2010 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2010.
--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 |
01e606cda5192c4254c090624a0b2ca92da6da8e |
|
24-Jun-2009 |
Timo Sirainen <tss@iki.fi> |
Moved some common istream functionality to default istream implementation.
--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 |
8edc373587d75f8040e3c4416e50638aa2a32188 |
|
25-Jan-2008 |
Timo Sirainen <tss@iki.fi> |
If EOF is triggered with keyboard (^D), make sure to return EOF for future
reads as well.
--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 |
c9bf63e9094761767a63ac6b189bcf60bcffdc44 |
|
17-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
Use likely() and unlikely() macros to make commonly checked error handling
paths unlikely.
--HG--
branch : HEAD |
14175321ddb88619015866978c05a27786ca4814 |
|
20-Oct-2007 |
Timo Sirainen <tss@iki.fi> |
Added i_stream_get_buffer_space() to remove code duplication.
--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 |
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 |
211a5af4646ed51a0d449dd5065d91ff4a26f3a4 |
|
31-Mar-2007 |
Timo Sirainen <tss@iki.fi> |
Moved I_STREAM_MIN_SIZE to header
--HG--
branch : HEAD |
904f9d5654b9c39edcdf32883e5e88771faf4d69 |
|
31-Mar-2007 |
Timo Sirainen <tss@iki.fi> |
Moved i_stream_compress() to generic code
--HG--
branch : HEAD |
7ef5ca6fb59a318c821a852ae48a2edbb671d7dd |
|
31-Mar-2007 |
Timo Sirainen <tss@iki.fi> |
If istream implementation doesn't set set_max_buffer_size() or stat(),
implement them ourself. Moved some generic code to istream.
--HG--
branch : HEAD |
cd1eef2109b4476842b7757f1d69b104196d5941 |
|
07-Mar-2007 |
Timo Sirainen <tss@iki.fi> |
Removed caching from i_stream_stat(). The changes could be important in mbox
syncing.
--HG--
branch : HEAD |
c06f4017027263cf3a08becc551f5126409e2a83 |
|
05-Feb-2007 |
Timo Sirainen <tss@iki.fi> |
Added istream->blocking setting. It's now used to assert-crash early if a
blocking stream unexpectedly returns "need more data".
--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 |
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 |
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 |
411d6baa37f31d90730e90c4a28c43e1974bbe58 |
|
28-Mar-2005 |
Timo Sirainen <tss@iki.fi> |
Added seekable variable to struct istream.
--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 |
1060afdc2fcdf647dbb3bc11647401f1b44a3a8a |
|
22-Aug-2004 |
Timo Sirainen <tss@iki.fi> |
_read() never returns 0 for files.
--HG--
branch : HEAD |
9e095dd6a77097356aca8216356d4d71ef1bea45 |
|
22-Aug-2004 |
Timo Sirainen <tss@iki.fi> |
Removed istream.disconnected, it's too much of a special case and the only
place where it's needed will be removed soon. Added istream.eof back, it's
more useful.
--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 |
8bdf70ab07588d57373f5f19abb8577985ff358a |
|
18-Jun-2004 |
Timo Sirainen <tss@iki.fi> |
Renamed istream->eof to istream->disconnected which is what it currently
does.
--HG--
branch : HEAD |
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834 |
|
27-Apr-2004 |
Timo Sirainen <tss@iki.fi> |
importing new index code. mbox still broken.
--HG--
branch : HEAD |
b3142c8e513bc78da821fa70f479016148fa95e5 |
|
12-Nov-2003 |
Timo Sirainen <tss@iki.fi> |
cleanups
--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 |
8cba3d69f0d0a3f03dc3b630e18896aa00ebb6ff |
|
29-Oct-2003 |
Timo Sirainen <tss@iki.fi> |
fix
--HG--
branch : HEAD |
6a280c911b436892b2e9587915ced0be3b47669e |
|
29-Oct-2003 |
Timo Sirainen <tss@iki.fi> |
pread/pwrite fixes
--HG--
branch : HEAD |
143cb2e0744e647f8fc637bbdea1106c1587a4bf |
|
29-Oct-2003 |
Timo Sirainen <tss@iki.fi> |
Changed to use pread() with files.
--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 |
85b9a0f54e9f234f7dd67ca70a298535560d911b |
|
08-Feb-2003 |
Timo Sirainen <tss@iki.fi> |
use the file size only for regular files. FreeBSD gave sockets a size of 4
which broke things.
--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 |
3e25b17126e9536736d5da03697613e4c3af5f76 |
|
07-Jan-2003 |
Timo Sirainen <tss@iki.fi> |
Removed cr_lookup_pos optimization with i_stream_next_line(). It breaks if
the stream is used with anything else and it's probably not worth fixing.
--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 |
d54ef607275c4899e082fbeeb210346484d2e85f |
|
12-Dec-2002 |
Timo Sirainen <tss@iki.fi> |
net_receive, net_transmit: Return -2 for regular disconnection errors. Don't
log those errors. Some other cleanups.
--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 |