8aa8399893c66b40e2790a4568256807a6ec6742 |
|
30-Jan-2018 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
lib: ostream: Allow switching to a specific ioloop. |
b3b813a6473d1210eee94bd60eaa6bafd2131ed3 |
|
30-Jan-2018 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
lib: iostream: Record the ioloop that the iostream was last switched to. |
bcb4e51a409d94ae670de96afb8483a4f7855294 |
|
01-Jan-2018 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
Updated copyright notices to include the year 2018. |
7660a5183e89459d255dc5873894ff08806711d5 |
|
15-Nov-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: Add o_stream_abort() |
f8b6c3d6bc9d63665af5e0a3c8b604438e4c3a4e |
|
07-Nov-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: Add o_stream_get_last_write_time() |
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); |
660ecbaf80e6b3cf3a70ed1e0cdf7f8af6d895d0 |
|
01-Nov-2017 |
Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> |
lib: [io]_stream_close(NULL) should be no-ops |
d6193a892452ae87548f5745dada01f82816765d |
|
01-Nov-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: Add o_stream_set_finish_also_parent() and _finish_via_child()
These allow controlling on both directions whether o_stream_finish() should
be finishing the parent stream. If either one is set to FALSE, the parent
stream isn't finished. Which one of these to use depends on the situation. |
8109f3187f5ece5565de1813209af42dc7bb768b |
|
01-Nov-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: Use o_stream_flush_parent() |
5df4dbc38d7b7d54cba35a2c258366e1d4bac3c8 |
|
01-Nov-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: Add o_stream_flush_parent() |
5ec4fc44e8d4e2160f07b1a7f4fce1ccfec3f6c1 |
|
30-Oct-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: Automatically flush ostream when it's closed
Also verify that it unexpectedly didn't get fully flushed. |
84717f00ddbf5cd0ebe3f285090d5e97e458e19c |
|
30-Oct-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: Add o_stream_finish()
This marks the ostream as fully finished, with no further writes coming to
it. Otherwise it behaves like o_stream_flush().
The ostream.flush() methods are supposed to write their trailer (if the
ostream has one) when they see that ostream.finished is set. These will be
implemented by the following commits. |
34d5077c37dc6224a2d430a72ae51a3f38e9e4f6 |
|
30-Oct-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: o_stream_flush() - check for send overflows and reset error handling
This begins the removal of o_stream_nfinish(). |
b688884f23be2333bea1a8bd4ee849336aebedaa |
|
30-Oct-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: Remove o_stream_nflush()
None of its previous callers were calling it correctly, so it's better to
remove it entirely to avoid more of such wrong calls. |
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. |
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); |
b3fc5293379feb3640b23622bcc8f5f8d7f1e81d |
|
19-Sep-2017 |
Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> |
lib: [io]_stream_unref(NULL) should be a no-op |
d6684856fb99e51bc22a6346e08b2d81c996f963 |
|
19-Sep-2017 |
Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> |
lib: [io]_stream_destroy(NULL) should be a no-op |
2454dfa32c93c20a8522c6ed42fe057baaac9f9a |
|
01-Jan-2017 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
Updated copyright notices to include the year 2017. |
efe78d3ba24fc866af1c79b9223dc0809ba26cad |
|
24-Dec-2016 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
global: Replaced all instances of memset(p, 0, sizeof(*p)) with the new i_zero() macro.
Used the following script:
C_FILES=`git ls-files *.c`
H_FILES=`git ls-files *.h`
for F in "$C_FILES $H_FILES"; do
echo "$F"
perl -p -i -e 's/safe_memset\(&\(?([^,]*)\)?,\s*0,\s*sizeof\(\g1\)\)/i_zero_safe(&$1)/g' $F
perl -p -i -e 's/safe_memset\(([^,]*),\s*0,\s*sizeof\(\*\g1\)\)/i_zero_safe($1)/g' $F
perl -p -i -e 's/memset\(&\(?([^,]*)\)?,\s*0,\s*sizeof\(\g1\)\)/i_zero(&$1)/g' $F
perl -p -i -e 's/memset\(([^,]*),\s*0,\s*sizeof\(\*\g1\)\)/i_zero($1)/g' $F
done |
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. |
d04f3e064ceb2ba1d734182937a7115739ebadbe |
|
18-May-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: Simplify code with the new o_stream_send_istream() API |
b90fb7f78aca271243c26074ddd6587cce112a1e |
|
18-May-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: Added o_stream_nsend_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. |
9de176ef7f3d28ff486c2a8805110b84389e4f19 |
|
18-May-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: Don't silently ignore partial writes for o_stream_nsend()
Normally o_stream_nsend() should be used only for blocking streams or
streams with infinite (or "enough") buffer space. |
f988b93c2ef773987bcdcbfb4cca39b955e3a392 |
|
18-May-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: Removed ostream.last_failed_errno
It's been identical to ostream.stream_errno for a while now. |
3858a7a5da361c35f1e6e50c8e3214dc0cf379d6 |
|
16-May-2016 |
Phil Carmody <phil@dovecot.fi> |
lib: istream - migrate to i_stream_read_more()
Scripted to find all the low-hanging-fruit (single line calls), but hand-checked:
git grep i_stream_read_data.*,\ 0\) | sed s/:.*// | \
xargs sed -i -e 's/i_stream_read_data(\(.*\), \(.*\), \(.*\), 0)/i_stream_read_more(\1, \2, \3)/'
Signed-off-by: Phil Carmody <phil@dovecot.fi> |
5a1b498b646b5c5dbd1b3f3861df766f560578c5 |
|
21-Apr-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: When istream is destroyed, it now always unrefs the parent istream if it exists.
This way the implementations don't have to do it themselves in their
destroy() function. This change doesn't necessarily require changing the
existing code, because if the istream implementation already unrefs the
parent it gets set to NULL so the auto-unref won't be done. |
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/' |
981139bb2e446bb2050c1158614725f8413fd709 |
|
17-Jan-2015 |
Timo Sirainen <tss@iki.fi> |
lib: Added o_stream_create_passthrough() for creating simple wrapper ostreams |
eb98a038ca8b0ef33d1d11794803ce09547496fa |
|
17-Jan-2015 |
Timo Sirainen <tss@iki.fi> |
lib: Added o_stream_add_destroy_callback() |
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> |
3d77cc0d502dc69ffe2afe318605964dd40b7b20 |
|
13-Nov-2014 |
Timo Sirainen <tss@iki.fi> |
lib: ostream.stream_errno is now exactly the same as last_failed_errno.
There's a lot of code that checks only for stream_errno instead of
last_failed_errno at the flush time where the stream_errno might have
already been cleared.
I'm not sure why these were separated in the first place. I don't think
there are any stream errors which just correctly go away by retrying the
operation. Perhaps some code could have attempted seeking and try to handle
the ESPIPE error, but that kind of code paths are rare and they could clear
the errors themselves if needed. |
5ef6906c82f34a3edd2981dd98339cdd7bfe3bbe |
|
27-Oct-2014 |
Timo Sirainen <tss@iki.fi> |
lib: Make sure ostream.last_failed_errno is always set when stream_errno is set. |
d08e08aebe5aa5d6147767d393a0a15aef08ce7e |
|
27-Oct-2014 |
Timo Sirainen <tss@iki.fi> |
lib: o_stream_uncork() could also cause write errors. Make sure last_failed_errno is updated.
This caused some write errors not to be detected, such as in code like:
o_stream_cork()
o_stream_nsend(..)
o_stream_uncork()
if (o_stream_nfinish() < 0) {
// error not detected because last_failed_errno was 0
} |
63866b7a81355543832d3fe01cd744ddd4ea197b |
|
09-Oct-2014 |
Timo Sirainen <tss@iki.fi> |
lib: Fixed assert-crash in o_stream_send_istream() if input stream was the one that failed. |
db3ebf659c17fc5ca348a997e6311d20cfbb78e9 |
|
09-Oct-2014 |
Timo Sirainen <tss@iki.fi> |
lib: o_stream_send_istream() should return -1 if there was an error reading input stream. |
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. |
d691782ae9eb4f6ab06bc42f1617e889e7c18a3b |
|
03-Jul-2014 |
Timo Sirainen <tss@iki.fi> |
lib: Added o_stream_flush_parent_if_needed() for wrapper ostreams. |
10ff47d5d6146995e16da00d36eca7d162064a7b |
|
21-May-2014 |
Timo Sirainen <tss@iki.fi> |
lib: Added o_stream_is_corked(). |
556f95092c3bc850517d5ab2bb502024a55645f1 |
|
23-Apr-2014 |
Timo Sirainen <tss@iki.fi> |
Added o_stream_get_max_buffer_size() |
a8c5a86d183db25a57bf193c06b41e092ec2e151 |
|
04-Feb-2014 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2014. |
9a48c2243fe98ca8393be7908f84d20c634bcdf9 |
|
22-Nov-2013 |
Timo Sirainen <tss@iki.fi> |
ostream: Don't mark the stream closed too early after all.
Use another flag instead to avoid losing the last data written to the stream
before closing. |
59e26ff34b05cd971a111f8a42fc60c13d9f688b |
|
03-Nov-2013 |
Timo Sirainen <tss@iki.fi> |
ostream: Mark stream closed before handling its callback to avoid infinite loops.
The callback could call o_stream_copy_error_from_parent(), which in turn
would try to close the same ostream again. |
2d2ebe91d56e9a158de000c9d0026f65600fbcfa |
|
11-Oct-2013 |
Timo Sirainen <tss@iki.fi> |
liblib: If parent ostream closes itself on error, close our ostream as well.
This avoids a situation where ostream is basically unusable with
last_failed_errno set, but it's not marked as closed. The current code
often checks ostream->closed but doesn't check last_failed_errno.
ostream-file also autocloses the stream, but filter ostreams without this
patch don't autoclose, so this caused problems with e.g. IMAP COMPRESSION
extension where the zlib-ostream didn't get marked as closed, although the
problem was only logging "BUG: Unknown internal error" instead of
"Disconnected" as the client's disconnect reason. |
f4735bf7ec2019fdc730e9ebdb39e5a4ea580405 |
|
22-Sep-2013 |
Timo Sirainen <tss@iki.fi> |
lib: Added [io]_stream_create_error_str() |
904ca86f5d3f27505f50f5342214aabb78629cc8 |
|
22-Sep-2013 |
Timo Sirainen <tss@iki.fi> |
ostream-errno: last_failed_errno wasn't set, causing problems with some functions. |
862ec874f9373e3e499e237d3b9f71fdf1413fee |
|
19-Sep-2013 |
Timo Sirainen <tss@iki.fi> |
iostream: Added ability to set/get error strings for 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). |
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. |
4881b4b19c3c2dc634396f8d265e4817ecc74662 |
|
31-Jan-2013 |
Timo Sirainen <tss@iki.fi> |
ostream: If stream is closed with stream_errno=0, set it to EPIPE. |
d78be924ad150840e018eda6a8a7d5e46a39bda2 |
|
31-Jan-2013 |
Timo Sirainen <tss@iki.fi> |
ostream: Default seek&write_at implementations should fail with ESPIPE, not EPIPE. |
0c1835a90dd1dcedaeaedd1cd91672299cbeb5be |
|
30-Sep-2012 |
Timo Sirainen <tss@iki.fi> |
Added [io]_stream_create_error() for creating streams that always fail reads/writes. |
8b247780e911909a9fdc47f69ce6d1478902ad98 |
|
11-Aug-2012 |
Timo Sirainen <tss@iki.fi> |
Added o_stream_get_fd(). |
98a73e104c7b9c3747053e63113451e24daf7f36 |
|
01-Aug-2012 |
Timo Sirainen <tss@iki.fi> |
o_stream_ignore_last_errors() / o_stream_nfinish() now marks parent streams also as checked. |
571fd6ff94570ee11a72a20b649acfdac2495919 |
|
28-Jun-2012 |
Timo Sirainen <tss@iki.fi> |
Fixed ostream's new error handling not to always assert-crash. |
4e8d6d03c2ff85448df79b181a2ea850fb5d4199 |
|
27-Jun-2012 |
Timo Sirainen <tss@iki.fi> |
Try to avoid (void) casts by adding more ATTR_NOWARN_UNUSED_RESULT. |
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. |
a10ed8c47534b4c6b6bf2711ccfe577e720a47b4 |
|
23-Jun-2012 |
Timo Sirainen <tss@iki.fi> |
Marked functions parameters that are allowed to be NULL. Some APIs were also changed.
The non-obvious APIs where NULL parameter was changed to "" are
master_service_init() and auth_master_user_list_init().
These checks can currently be enabled only on a patched clang:
http://llvm.org/bugs/show_bug.cgi?id=6786 |
35283613d4c04ce18836e9fc431582c87b3710a0 |
|
26-Mar-2012 |
Timo Sirainen <tss@iki.fi> |
Changes to make static analyzer happier. |
5f5870385cff47efd2f58e7892f251cf13761528 |
|
12-Feb-2012 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2012. |
d66ef20c30fee728899ee168c75fcc5ff8fbdac1 |
|
08-Feb-2012 |
Timo Sirainen <tss@iki.fi> |
iostreams: Set errno to stream_errno when exiting from failing functions. |
f28583935a4509d3f7932738bba6c548ef455c82 |
|
21-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
ostream: Keep track of flush callback for filter ostreams as well. |
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. |
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 |
7e6ad778c7de5be3bcb79152ef58e2e52015906d |
|
13-Feb-2010 |
Timo Sirainen <tss@iki.fi> |
o_stream_uncork(): Use flush() as default uncork operation.
--HG--
branch : HEAD |
40fdb94d4db3d81e39f0f6655269ea7f6c268f32 |
|
06-Feb-2010 |
Timo Sirainen <tss@iki.fi> |
ostream: Added default failure handling if write_at() isn't implemented.
--HG--
branch : HEAD |
e59faf65ce864fe95dc00f5d52b8323cdbd0608a |
|
25-Jan-2010 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2010.
--HG--
branch : HEAD |
de954ff15b495be13007a8aca2c09fd1d356a283 |
|
16-Oct-2009 |
Timo Sirainen <tss@iki.fi> |
Added o_stream_get_buffer_avail_size().
--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 |
8cdb3234fe3c77e477c7a0e6934678f58fc54d4d |
|
25-Feb-2009 |
Timo Sirainen <tss@iki.fi> |
Added o_stream_pwrite().
--HG--
branch : HEAD |
45312f52ff3a3d4c137447be4c7556500c2f8bf2 |
|
06-Jan-2009 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2009.
--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 |
0dbcf4026ff8471b4d6d2e14f7e52321396bf087 |
|
24-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
o_stream_sendv(): If we're trying to send 0 bytes, just return 0
immediately.
--HG--
branch : HEAD |
6cc0546c058f3e6253c6f99727b28dd602712974 |
|
24-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
Added last_failed_errno to ostream to make error handling easier with files.
--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 |
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 |
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 |
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 |
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 |
989cafb9d84d8c98d6441fc1ab45b4c37762a98a |
|
22-Feb-2007 |
Timo Sirainen <tss@iki.fi> |
If o_stream_send_istream() fails, make sure errno is set to
outstream.stream_errno.
--HG--
branch : HEAD |
59151b71059df1190acd75d8717ed04a7920c862 |
|
15-Dec-2006 |
Timo Sirainen <tss@iki.fi> |
Added context parameter type safety checks for most callback APIs.
--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 |
cd56a23e21f1df3f79648cf07e2f4385e2fadebb |
|
25-Feb-2006 |
Timo Sirainen <tss@iki.fi> |
Added i_stream_destroy() and o_stream_destroy() and used them instead of
*_stream_unref() where possible. Fixes at least one problem with io_remove()
being called after socket was closed, which caused problems with epoll.
--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 |
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 |
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 |
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 |
b92e979748a22925b0770d3004eaab043ed69574 |
|
22-Aug-2004 |
Timo Sirainen <tss@iki.fi> |
o_stream_send* functions return type is ssize_t, not int.
--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 |
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 |
daf029d2a627daa39d05507140f385162828172e |
|
23-Jan-2003 |
Timo Sirainen <tss@iki.fi> |
More type safety to i/o streams
--HG--
branch : HEAD |
f923659c0e5298263d80622c99f4dc4132b4675b |
|
11-Jan-2003 |
Timo Sirainen <tss@iki.fi> |
Naming change for function typedefs.
--HG--
branch : HEAD |
26bf232648033b80f967dd49dcf944664b70d84a |
|
09-Jan-2003 |
Timo Sirainen <tss@iki.fi> |
Remove one of the previous speedups, it broke things
--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 |
555ebb032f9b8f0cdb66f27ce7374734833e7cac |
|
19-Dec-2002 |
Timo Sirainen <tss@iki.fi> |
Buffer related cleanups. Use PATH_MAX instead of hardcoded 1024 for paths.
Added str_path() and str_ppath() functions. i_snprintf() now returns only -1
or 0 depending on if buffer got full. dec2str() returns the string allocated
from data stack. Instead of just casting to (long) or (int), we now use
dec2str() with printf-like functions. Added o_stream_send_str(). Added
strocpy() and replaced all strcpy()s and strncpy()s with it.
Pretty much untested, hope it doesn't break too badly :)
--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 |