]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
9 years agolib-imap-storage: Don't double-filter HEADER.FIELDS (..) headers.
Timo Sirainen [Wed, 18 May 2016 11:27:03 +0000 (14:27 +0300)] 
lib-imap-storage: Don't double-filter HEADER.FIELDS (..) headers.

9 years agolib-imap-storage: Minor error logging cleanup/fix.
Timo Sirainen [Wed, 18 May 2016 11:24:55 +0000 (14:24 +0300)] 
lib-imap-storage: Minor error logging cleanup/fix.

We read from input, not from mail_input. In theory it could have the actual
error instead of mail_input (although right now it couldn't).

9 years agolib: istream-file: Fixed o_stream_send_istream()
Timo Sirainen [Wed, 18 May 2016 16:22:40 +0000 (19:22 +0300)] 
lib: istream-file: Fixed o_stream_send_istream()

9 years agolib-http: Fixed checking if istream or ostream needs waiting.
Timo Sirainen [Wed, 18 May 2016 15:51:55 +0000 (18:51 +0300)] 
lib-http: Fixed checking if istream or ostream needs waiting.

9 years agolib: If epoll_ctl() fails, panic instead of just fatal.
Timo Sirainen [Wed, 18 May 2016 15:48:27 +0000 (18:48 +0300)] 
lib: If epoll_ctl() fails, panic instead of just fatal.

This makes it easier to fix such bugs.

9 years agolib-mail: Improve ostream-dot unit test
Timo Sirainen [Wed, 18 May 2016 15:44:10 +0000 (18:44 +0300)] 
lib-mail: Improve ostream-dot unit test

9 years agolib: ostream-escaped: Fixed setting offset
Timo Sirainen [Wed, 18 May 2016 15:41:33 +0000 (18:41 +0300)] 
lib: ostream-escaped: Fixed setting offset

9 years agolib: Added comment to what ostream.offset actually is
Timo Sirainen [Wed, 18 May 2016 15:42:14 +0000 (18:42 +0300)] 
lib: Added comment to what ostream.offset actually is

9 years agolib-fs: ostream-metawrap: Fixed o_stream_send_istream() offset updates
Timo Sirainen [Wed, 18 May 2016 14:56:55 +0000 (17:56 +0300)] 
lib-fs: ostream-metawrap: Fixed o_stream_send_istream() offset updates

9 years agolib: Don't set ostream buffer as blocking
Timo Sirainen [Wed, 18 May 2016 14:45:09 +0000 (17:45 +0300)] 
lib: Don't set ostream buffer as blocking

9 years agolib: iostream-temp: Fixed sending more output after o_stream_send_istream()
Timo Sirainen [Wed, 18 May 2016 14:42:06 +0000 (17:42 +0300)] 
lib: iostream-temp: Fixed sending more output after o_stream_send_istream()

9 years agolib: iostream-temp: Fixed o_stream_send_istream()
Timo Sirainen [Wed, 18 May 2016 14:41:32 +0000 (17:41 +0300)] 
lib: iostream-temp: Fixed o_stream_send_istream()

9 years agoRemoved buffer_reset().
Timo Sirainen [Mon, 16 May 2016 10:21:57 +0000 (13:21 +0300)] 
Removed buffer_reset().

It was just a wrapper to buffer_set_used_size() and its comment was a bit
confusing (or obsolete), since it wasn't actually immediately zeroing out
the buffer.

9 years agolib: Updated buffer_set_used_size() comment and added unit test.
Timo Sirainen [Mon, 16 May 2016 10:19:50 +0000 (13:19 +0300)] 
lib: Updated buffer_set_used_size() comment and added unit test.

9 years agoglobal: Simplify code with the new o_stream_send_istream() API
Timo Sirainen [Mon, 16 May 2016 18:03:35 +0000 (21:03 +0300)] 
global: Simplify code with the new o_stream_send_istream() API

9 years agolib: istream-sized should log errors with its own name, not parent's name
Timo Sirainen [Mon, 16 May 2016 17:17:41 +0000 (20:17 +0300)] 
lib: istream-sized should log errors with its own name, not parent's name

9 years agoimap: Code cleanup - use istream-sized for GETMETADATA reply
Timo Sirainen [Mon, 16 May 2016 17:12:40 +0000 (20:12 +0300)] 
imap: Code cleanup - use istream-sized for GETMETADATA reply

This avoids doing the same work explicitly.

9 years agoglobal: Use o_stream_nsend_istream() where useful
Timo Sirainen [Mon, 16 May 2016 17:06:30 +0000 (20:06 +0300)] 
global: Use o_stream_nsend_istream() where useful

We can skip all of the io error handling and just leave it to
o_stream_nfinish().

9 years agolib: Added o_stream_nsend_istream()
Timo Sirainen [Mon, 16 May 2016 17:04:38 +0000 (20:04 +0300)] 
lib: Added o_stream_nsend_istream()

9 years agolib: Simplified and clarified o_stream_send_istream() API
Timo Sirainen [Mon, 16 May 2016 16:48:41 +0000 (19:48 +0300)] 
lib: Simplified and clarified o_stream_send_istream() API

9 years agolib: Added ostream.blocking boolean
Timo Sirainen [Mon, 16 May 2016 16:33:40 +0000 (19:33 +0300)] 
lib: Added ostream.blocking boolean

Similar to istream.blocking.

9 years agolib: Don't silently ignore partial writes for o_stream_nsend()
Timo Sirainen [Mon, 16 May 2016 16:26:26 +0000 (19:26 +0300)] 
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.

9 years agolmtp: Fixed error logging when writing to temp file
Timo Sirainen [Mon, 16 May 2016 16:16:55 +0000 (19:16 +0300)] 
lmtp: Fixed error logging when writing to temp file

9 years agolib: Removed ostream.last_failed_errno
Timo Sirainen [Mon, 16 May 2016 13:58:44 +0000 (16:58 +0300)] 
lib: Removed ostream.last_failed_errno

It's been identical to ostream.stream_errno for a while now.

9 years agolib-compression: Changed impossible errors to asserts.
Timo Sirainen [Mon, 16 May 2016 13:55:34 +0000 (16:55 +0300)] 
lib-compression: Changed impossible errors to asserts.

o_stream_flush() no longer calls the stream's flush() if stream has failed.

9 years agolib: istream-file: Code cleanup
Timo Sirainen [Mon, 16 May 2016 13:27:53 +0000 (16:27 +0300)] 
lib: istream-file: Code cleanup

No functional changes

9 years agoglobal: Don't assume o_stream_send_istream() return bytes sent.
Timo Sirainen [Mon, 16 May 2016 13:09:52 +0000 (16:09 +0300)] 
global: Don't assume o_stream_send_istream() return bytes sent.

This won't be true soon after its API changes.

9 years agoglobal: Use [io]_stream_get_error() insted of %m
Timo Sirainen [Mon, 16 May 2016 12:49:08 +0000 (15:49 +0300)] 
global: Use [io]_stream_get_error() insted of %m

9 years agoglobal: Code cleanup - remove unnecessary errno changes.
Timo Sirainen [Mon, 16 May 2016 12:34:49 +0000 (15:34 +0300)] 
global: Code cleanup - remove unnecessary errno changes.

These were left behind from changing %m to [io]_stream_get_error()

9 years agodbox: iostream error logging improvements.
Timo Sirainen [Mon, 16 May 2016 12:22:11 +0000 (15:22 +0300)] 
dbox: iostream error logging improvements.

9 years agoglobal: Replaced all i_stream_read_data() with _more() and _bytes()
Timo Sirainen [Mon, 16 May 2016 18:53:00 +0000 (21:53 +0300)] 
global: Replaced all i_stream_read_data() with _more() and _bytes()

9 years agoglobal: Fixed slighty wrong i_stream_read_data() with _read_bytes()
Timo Sirainen [Mon, 16 May 2016 18:51:56 +0000 (21:51 +0300)] 
global: Fixed slighty wrong i_stream_read_data() with _read_bytes()

These calls were reading one byte more than they were intended to read.
This didn't really cause any problems, but now they're correct.

9 years agodoveadm-mailbox-delete: Restore recursive parameter
Aki Tuomi [Wed, 18 May 2016 06:33:15 +0000 (09:33 +0300)] 
doveadm-mailbox-delete: Restore recursive parameter

9 years agodict: Fix crash when no dictionaries defined
Aki Tuomi [Wed, 18 May 2016 06:29:04 +0000 (09:29 +0300)] 
dict: Fix crash when no dictionaries defined

9 years agoimap: Include sync timing information in tagged command replies.
Timo Sirainen [Mon, 16 May 2016 21:00:43 +0000 (00:00 +0300)] 
imap: Include sync timing information in tagged command replies.
Show it only when it's larger than 0 to avoid unnecessary output.

9 years agodoveadm-mail-mailbox: Whitespace fix
Aki Tuomi [Tue, 17 May 2016 20:51:43 +0000 (23:51 +0300)] 
doveadm-mail-mailbox: Whitespace fix

9 years agodoveadm-mailbox: Add update subcommand
Aki Tuomi [Tue, 17 May 2016 20:31:29 +0000 (23:31 +0300)] 
doveadm-mailbox: Add update subcommand

9 years agolib-mail: Fixed istream-header-filter callback's matched with eoh
Timo Sirainen [Sun, 15 May 2016 11:53:24 +0000 (14:53 +0300)] 
lib-mail: Fixed istream-header-filter callback's matched with eoh

Reversed the matched-parameter handling for hdr->eoh, so it's consistent
with non-eoh headers.

9 years agolib-ldap: Fixed assert-crash when killing LDAP connection.
Timo Sirainen [Thu, 12 May 2016 21:45:34 +0000 (17:45 -0400)] 
lib-ldap: Fixed assert-crash when killing LDAP connection.

libldap may have already closed the fd, so with epoll io_remove() would
try to remove it and crash with:

Panic: epoll_ctl(del, 12) failed: Bad file descriptor

9 years agouri-util: Changed URI host/authority parsing API to not use a boolean.
Stephan Bosch [Mon, 16 May 2016 16:43:52 +0000 (18:43 +0200)] 
uri-util: Changed URI host/authority parsing API to not use a boolean.

The boolean indicated whether the basic reg-name syntax or the more limited Internet host name syntax was to be expected.
This change creates separate functions for this.

9 years agouri-util: Two ATTR_NULL specifications were misplaced or wrong.
Stephan Bosch [Mon, 16 May 2016 16:21:30 +0000 (18:21 +0200)] 
uri-util: Two ATTR_NULL specifications were misplaced or wrong.

9 years agouri-util: The uri_parse_host_name_dns() would segfault if the hostname_r parameter...
Stephan Bosch [Mon, 16 May 2016 16:19:24 +0000 (18:19 +0200)] 
uri-util: The uri_parse_host_name_dns() would segfault if the hostname_r parameter was NULL.

9 years agolib: istream - migrate more to i_stream_read_more()
Phil Carmody [Mon, 8 Feb 2016 17:30:39 +0000 (19:30 +0200)] 
lib: istream - migrate more to i_stream_read_more()

More coccinelle semantic patching, again hand-checked.

  git grep 'i_stream_read_data' | sed s/:.*// | \
    while read f; do spatch --sp-file istream0.cocci --in-place "$f" ; done

-- 8< --- istream0.cocci ---
@@
expression e1, e2, e3;
@@

- i_stream_read_data(e1, e2, e3, 0)
+ i_stream_read_more(e1, e2, e3)
-- 8< --- end

Signed-off-by: Phil Carmody <phil@dovecot.fi>
9 years agolib: istream - more migration to i_stream_read_bytes()
Phil Carmody [Mon, 8 Feb 2016 17:26:20 +0000 (19:26 +0200)] 
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>
9 years agolib: istream - migrate to i_stream_read_bytes()
Phil Carmody [Mon, 8 Feb 2016 16:55:32 +0000 (18:55 +0200)] 
lib: istream - migrate to i_stream_read_bytes()

Scripted to pick off the low hanging fruit, one liners with an explicit
'-1' in the final parameter, but hand-checked.

  git grep 'i_stream_read_data.*, [^,]*- \?1)' | sed s/:.*// | \
    xargs sed -i -e 's/i_stream_read_data(\(.*\), \(.*\), \(.*\), \(.*[^ ]\) \?- \?1)/i_stream_read_bytes(\1, \2, \3, \4)/'

Signed-off-by: Phil Carmody <phil@dovecot.fi>
9 years agolib: istream - migrate to i_stream_read_more()
Phil Carmody [Mon, 8 Feb 2016 16:43:32 +0000 (18:43 +0200)] 
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>
9 years agolib: istream - provide alternatives to i_stream_read_data()
Phil Carmody [Mon, 8 Feb 2016 16:32:10 +0000 (18:32 +0200)] 
lib: istream - provide alternatives to i_stream_read_data()

Providing as a parameter the number of bytes that you would be
disappointed to receive was confusing compared to providing the
number that you would be happy to receive. This lets us get rid
of all the '-1's in the callers. The callers which used 0 as
a parameter were so common that it's worth providing a separate
API just to simplify their demands.

Deep down, these are still the same underlying function. Currently
we route the new API through the old one, but eventually, the old
API can be routed through the new one, so that the friendlier
interface has the simplest implementation.

Signed-off-by: Phil Carmody <phil@dovecot.fi>
9 years agouri-util: Added documentation for all functions in header.
Stephan Bosch [Sat, 14 May 2016 22:22:12 +0000 (00:22 +0200)] 
uri-util: Added documentation for all functions in header.

9 years agouri-util: Made URI encoding functions accept NULL pointer for additional escaped...
Stephan Bosch [Sun, 8 May 2016 21:44:42 +0000 (23:44 +0200)] 
uri-util: Made URI encoding functions accept NULL pointer for additional escaped characters.

9 years agouri-util: Made uri_data_encode() public.
Stephan Bosch [Sun, 8 May 2016 21:40:38 +0000 (23:40 +0200)] 
uri-util: Made uri_data_encode() public.

9 years agouri-util: Improved implementation of uri_data_encode().
Stephan Bosch [Sun, 8 May 2016 21:30:05 +0000 (23:30 +0200)] 
uri-util: Improved implementation of uri_data_encode().

9 years agouri-util: Reworked URI scheme parsing.
Stephan Bosch [Sun, 8 May 2016 21:12:07 +0000 (23:12 +0200)] 
uri-util: Reworked URI scheme parsing.

Made uri_cut_scheme() use uri_parse_scheme() internally rather than the other way around.

9 years agolib-imap: Started using struct uri_host in struct imap_url.
Stephan Bosch [Sun, 8 May 2016 21:09:33 +0000 (23:09 +0200)] 
lib-imap: Started using struct uri_host in struct imap_url.

9 years agolib-http: Started using struct uri_host in struct http_url.
Stephan Bosch [Sun, 8 May 2016 21:08:00 +0000 (23:08 +0200)] 
lib-http: Started using struct uri_host in struct http_url.

9 years agouri-util: Split struct uri_host from uri_authority.
Stephan Bosch [Sun, 8 May 2016 21:06:23 +0000 (23:06 +0200)] 
uri-util: Split struct uri_host from uri_authority.

Adds support for parsing host separately and manipulating host struct.

9 years agouri-util: Added complete syntax comment.
Stephan Bosch [Sun, 8 May 2016 21:03:38 +0000 (23:03 +0200)] 
uri-util: Added complete syntax comment.

9 years agouri-util: Added support for initializing the URI parser from data.
Stephan Bosch [Sun, 8 May 2016 22:31:43 +0000 (00:31 +0200)] 
uri-util: Added support for initializing the URI parser from data.

9 years agouri-util: Parsing of unreserved syntax erroneously included percent encoding.
Stephan Bosch [Sun, 8 May 2016 22:30:14 +0000 (00:30 +0200)] 
uri-util: Parsing of unreserved syntax erroneously included percent encoding.

This functionality is currently not used, so no problems would occur.

9 years agouri-util: Implemented proper parsing of DNS-based host name for URI schemes that...
Stephan Bosch [Sun, 8 May 2016 20:59:09 +0000 (22:59 +0200)] 
uri-util: Implemented proper parsing of DNS-based host name for URI schemes that use DNS host names, such as http and imap.

9 years agouri-util: Added public function for parsing single percent encoding instances.
Stephan Bosch [Sun, 8 May 2016 20:56:59 +0000 (22:56 +0200)] 
uri-util: Added public function for parsing single percent encoding instances.

9 years agouri-util: Removed have_port and have_host_ip flags.
Stephan Bosch [Sun, 8 May 2016 20:55:25 +0000 (22:55 +0200)] 
uri-util: Removed have_port and have_host_ip flags.

Presence of port can be tested with port != 0.
Presence of IP can be tested with ip->family != 0.

9 years agolib-ldap: Do not create new context and lose settings
Aki Tuomi [Sun, 15 May 2016 14:25:17 +0000 (17:25 +0300)] 
lib-ldap: Do not create new context and lose settings

9 years agolib-mail: istream-qp-decoder: For efficiency, avoid copying data between decode buffe...
Stephan Bosch [Sat, 14 May 2016 20:49:53 +0000 (22:49 +0200)] 
lib-mail: istream-qp-decoder: For efficiency, avoid copying data between decode buffer and stream buffer.

Instead, use the decode buffer directly as stream buffer.

9 years agolib-ldap: Compiling fix - don't pass through void return
Timo Sirainen [Sat, 14 May 2016 22:17:18 +0000 (01:17 +0300)] 
lib-ldap: Compiling fix - don't pass through void return

9 years agoimap: Set command start timestamps earlier.
Timo Sirainen [Fri, 13 May 2016 18:22:40 +0000 (14:22 -0400)] 
imap: Set command start timestamps earlier.

Previously timing statistics in taglines weren't shown commands that didn't
read any parameters.

Also the timings now include the time speng reading command parameters from
client. For example:

a list "" {1}
+ OK
%
* LIST (\HasNoChildren) "/" INBOX
a OK List completed (0.001 + 1.214 secs).

9 years agolib: Fixed istream_seekable.stat() to return correct size.
Timo Sirainen [Fri, 13 May 2016 17:35:50 +0000 (13:35 -0400)] 
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.

9 years agolib-fs: Make sure fs-metawrap catches all write errors.
Timo Sirainen [Fri, 13 May 2016 13:56:08 +0000 (09:56 -0400)] 
lib-fs: Make sure fs-metawrap catches all write errors.

The full istream may not have been written in case ostream only partially
wrote the data (e.g. out of disk space?)

9 years agolib-fs: If fs-metawrap sees truncated header, it should return error.
Timo Sirainen [Fri, 13 May 2016 13:48:13 +0000 (09:48 -0400)] 
lib-fs: If fs-metawrap sees truncated header, it should return error.

9 years agolib: Fixed potential crash in i_stream_stat() failures.
Timo Sirainen [Fri, 13 May 2016 13:23:52 +0000 (09:23 -0400)] 
lib: Fixed potential crash in i_stream_stat() failures.

We shouldn't have been copying parent's stream_errno here. Especially
because the parent can be NULL.

9 years agodict: Set default transaction commit callback
Aki Tuomi [Fri, 13 May 2016 10:10:04 +0000 (13:10 +0300)] 
dict: Set default transaction commit callback

Removes need for NULL check on drivers

9 years agolib-storage: Fixed istream error handling while saving mails.
Timo Sirainen [Tue, 10 May 2016 21:09:02 +0000 (17:09 -0400)] 
lib-storage: Fixed istream error handling while saving mails.

We might have logged them as write errors, or we might have ignored the
error if i_stream_read() failed. Now the behavior is consistent.

9 years agolib-storage: Moved common code to index_storage_save_continue()
Timo Sirainen [Tue, 10 May 2016 21:06:54 +0000 (17:06 -0400)] 
lib-storage: Moved common code to index_storage_save_continue()

9 years agoAdded LIBDOVECOT_SQL_INCLUDE to dovecot-config and dovecot.m4.
Stephan Bosch [Tue, 10 May 2016 18:37:55 +0000 (20:37 +0200)] 
Added LIBDOVECOT_SQL_INCLUDE to dovecot-config and dovecot.m4.

9 years agolib: remove failed bool from sized_istream struct
Martti Rannanjärvi [Mon, 9 May 2016 08:08:33 +0000 (11:08 +0300)] 
lib: remove failed bool from sized_istream struct

This is no longer needed as we are now checking for
stream_errno also in istream.c

9 years agodoc: remove doveadm mount manpages
Martti Rannanjärvi [Tue, 10 May 2016 10:51:29 +0000 (13:51 +0300)] 
doc: remove doveadm mount manpages

9 years agolib-fs: Added FS_PROPERTY_FASTCOPY_CHANGED_METADATA
Timo Sirainen [Thu, 12 May 2016 19:10:47 +0000 (15:10 -0400)] 
lib-fs: Added FS_PROPERTY_FASTCOPY_CHANGED_METADATA

9 years agolib-http: Queue's delayed timeout handler wasn't removed after work was done.
Timo Sirainen [Thu, 12 May 2016 12:09:56 +0000 (08:09 -0400)] 
lib-http: Queue's delayed timeout handler wasn't removed after work was done.

9 years agolib-fs: Minor code cleanup
Timo Sirainen [Thu, 12 May 2016 11:24:39 +0000 (07:24 -0400)] 
lib-fs: Minor code cleanup

9 years agolib-fs: Set fs error on fs_write_stream_abort()
Timo Sirainen [Thu, 12 May 2016 11:23:51 +0000 (07:23 -0400)] 
lib-fs: Set fs error on fs_write_stream_abort()

Probably would be nice for fs_write_stream_abort() to have an error string
parameter, which could be used instead of this generic error.

9 years agolib-fs: Added asserts to make sure async writes are finished before close
Timo Sirainen [Thu, 12 May 2016 11:23:04 +0000 (07:23 -0400)] 
lib-fs: Added asserts to make sure async writes are finished before close

9 years agofs-metawrap: Minor code cleanup
Timo Sirainen [Thu, 12 May 2016 11:21:38 +0000 (07:21 -0400)] 
fs-metawrap: Minor code cleanup

temp_output==NULL, so these calls are equal.

9 years agofs-metawrap: Propagate fs_write_stream_abort() to parent always
Timo Sirainen [Thu, 12 May 2016 11:18:49 +0000 (07:18 -0400)] 
fs-metawrap: Propagate fs_write_stream_abort() to parent always

It needed to be done also when temp_output==NULL, because we had already
started sending it to parent, but async parent wasn't being finished.

9 years agofs-randomfail: Set fs error always when injecting failure.
Timo Sirainen [Thu, 12 May 2016 11:15:41 +0000 (07:15 -0400)] 
fs-randomfail: Set fs error always when injecting failure.

It was done in some places, but not everywhere.

9 years agolmtp: Removed (Dovecot) from Received header.
Timo Sirainen [Thu, 12 May 2016 09:40:29 +0000 (05:40 -0400)] 
lmtp: Removed (Dovecot) from Received header.

Some people want to hide it, and I don't really see much benefit in
including it anyway. So lets just hide it from everyone.

9 years agodict-sql: Cache reading settings files.
Timo Sirainen [Wed, 11 May 2016 20:58:59 +0000 (16:58 -0400)] 
dict-sql: Cache reading settings files.

The settings were read for every dict init, which was done for every new
dict connection. This was using a lot of CPU. There are usually only a
couple dict-sql settings files, so we cache all of the ones we read.

9 years agolib-sql: Memory leak fix when freeing sql dbs from cache
Timo Sirainen [Wed, 11 May 2016 20:57:33 +0000 (16:57 -0400)] 
lib-sql: Memory leak fix when freeing sql dbs from cache

Normally happened only at deinit.

9 years agodsync: Fixed potential crash
Timo Sirainen [Wed, 11 May 2016 09:19:14 +0000 (05:19 -0400)] 
dsync: Fixed potential crash

This seems to be possible with dsync_mailbox_find_common_expunged_uid() ->
dsync_mailbox_common_uid_found() -> dsync_mailbox_rewind_search() -> following
search doesn't find anything.

9 years agolib-ldap: Reverted previous commit for now.
Timo Sirainen [Tue, 10 May 2016 21:35:43 +0000 (17:35 -0400)] 
lib-ldap: Reverted previous commit for now.

We don't have libdovecot built at at this stage. But we can't build it
earlier, because it needs lib-dict-extra, which needs lib-ldap. So we have
cyclical dependencies now.

9 years agolib-ldap: Add libdovecot dependency to libdovecot-ldap
Timo Sirainen [Tue, 10 May 2016 21:25:20 +0000 (17:25 -0400)] 
lib-ldap: Add libdovecot dependency to libdovecot-ldap

Required for linking to work on OSX.

9 years agolib: Fixed crash when closing a failed istream-concat
Timo Sirainen [Tue, 10 May 2016 20:22:23 +0000 (16:22 -0400)] 
lib: Fixed crash when closing a failed istream-concat

i_stream_concat_seek() could have set cur_input==NULL and we still
attempted to seek the cur_input at close time.

9 years agolib-index: "first saved UID of the day" wasn't updated right always.
Timo Sirainen [Tue, 10 May 2016 14:42:33 +0000 (10:42 -0400)] 
lib-index: "first saved UID of the day" wasn't updated right always.

It was using the UID of the first append. But it may not have been the
lowest UID. Do this after the appends are first sorted by their UID.

9 years agoAdded liblzma bug to Valgrind suppressions file.
Stephan Bosch [Mon, 9 May 2016 22:42:51 +0000 (00:42 +0200)] 
Added liblzma bug to Valgrind suppressions file.

It caused `make test` to fail with valgrind.
Occurred at least for Debian Jessie with liblzma package version 5.1.1alpha+20120614-2+b3.

9 years agolib-storage: Add %{session} to mail_log_prefix by default
Baofeng Wang [Wed, 20 Apr 2016 14:23:12 +0000 (17:23 +0300)] 
lib-storage: Add %{session} to mail_log_prefix by default

Parameter is added to initialization string.

9 years agolib: check stream_errno too when checking whether istream is closed
Martti Rannanjärvi [Mon, 9 May 2016 07:40:56 +0000 (10:40 +0300)] 
lib: check stream_errno too when checking whether istream is closed

9 years agolib: Use arc4random if present
Aki Tuomi [Sun, 24 Apr 2016 18:06:41 +0000 (21:06 +0300)] 
lib: Use arc4random if present

9 years agolib: Do not use OpenSSL to read random bytes
Aki Tuomi [Tue, 12 Apr 2016 07:25:09 +0000 (10:25 +0300)] 
lib: Do not use OpenSSL to read random bytes

9 years agoREADME: Added missing supported RFCs
Timo Sirainen [Mon, 9 May 2016 05:04:39 +0000 (08:04 +0300)] 
README: Added missing supported RFCs

9 years agolib-dict: Compiler warning fix
Timo Sirainen [Sun, 8 May 2016 21:55:21 +0000 (00:55 +0300)] 
lib-dict: Compiler warning fix

I don't think it's possible that error was used uninitialized, but some gcc
version seems to think so.

9 years agodict-client: Use standard str_tabescape-functions
Timo Sirainen [Fri, 6 May 2016 14:28:33 +0000 (17:28 +0300)] 
dict-client: Use standard str_tabescape-functions

There's no reason to reimplement them here separately.

9 years agolib-dict: dict_transaction_commit*() returns now error string
Timo Sirainen [Fri, 6 May 2016 12:14:02 +0000 (15:14 +0300)] 
lib-dict: dict_transaction_commit*() returns now error string