]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
10 years agolib-fs: fs_write() didn't update stats.write_count correctly.
Timo Sirainen [Sun, 16 Aug 2015 11:07:21 +0000 (13:07 +0200)] 
lib-fs: fs_write() didn't update stats.write_count correctly.
If backend implemented asynchronous write(), the write_count was updated multiple
times. If backend didn't implement write(), then it was counted twice.

10 years agodsync: Fixed syncing a recursive delete of mailbox with children.
Timo Sirainen [Sat, 15 Aug 2015 10:14:35 +0000 (12:14 +0200)] 
dsync: Fixed syncing a recursive delete of mailbox with children.
For example if 1/2/3 exists in both sides and then 1/2/3, 1/2 and 1 are
deleted from one side, the next dsync would delete 1/2/3, but leave 1/2 and
1 undeleted.

10 years agodsync: If mailbox is already deleted locally, don't attempt to delete it again.
Timo Sirainen [Sat, 15 Aug 2015 10:05:34 +0000 (12:05 +0200)] 
dsync: If mailbox is already deleted locally, don't attempt to delete it again.
This only caused an unnecessary desync warning / exit code.

10 years agopop3: Added pop3_delete_type setting with values "default", "expunge" or "flag".
Timo Sirainen [Wed, 12 Aug 2015 09:52:06 +0000 (12:52 +0300)] 
pop3: Added pop3_delete_type setting with values "default", "expunge" or "flag".
This is related to pop3_deleted_flag setting. The main behefit here is that
you can now hide messages from POP3 by setting pop3_deleted_flag, but
without changing the actual deletion behavior by setting
pop3_delete_type=expunge.

10 years agolib-fts: Install headers on make install.
Timo Sirainen [Tue, 11 Aug 2015 11:27:01 +0000 (14:27 +0300)] 
lib-fts: Install headers on make install.

10 years agorawlog: Removed unnecessary/duplicate 'o' from getopt_args
Timo Sirainen [Mon, 10 Aug 2015 12:39:50 +0000 (15:39 +0300)] 
rawlog: Removed unnecessary/duplicate 'o' from getopt_args
This caused assert-crash at startup after ff17864ba6e0.

10 years agolda: Removed unnecessary/duplicate 'k' from getopt_args
Timo Sirainen [Mon, 10 Aug 2015 12:35:43 +0000 (15:35 +0300)] 
lda: Removed unnecessary/duplicate 'k' from getopt_args
This caused assert-crash at startup after ff17864ba6e0.

10 years agoman: doveadm-import -s description updated
Timo Sirainen [Sun, 9 Aug 2015 18:54:33 +0000 (21:54 +0300)] 
man: doveadm-import -s description updated
The previously mentioned subscriptions-file is specific to Maildir format.

10 years agodoveadm: Make sure we can't accidentally add duplicate getopt args.
Timo Sirainen [Fri, 7 Aug 2015 12:32:28 +0000 (15:32 +0300)] 
doveadm: Make sure we can't accidentally add duplicate getopt args.

10 years agolib-master: Make sure we can't accidentally add duplicate getopt args.
Timo Sirainen [Fri, 7 Aug 2015 12:32:14 +0000 (15:32 +0300)] 
lib-master: Make sure we can't accidentally add duplicate getopt args.

10 years agostats: Added session=<ID> filter to doveadm dump session|command
Timo Sirainen [Fri, 7 Aug 2015 12:30:26 +0000 (15:30 +0300)] 
stats: Added session=<ID> filter to doveadm dump session|command

10 years agodsync: Renamed -F parameter to -O to avoid a conflict
Timo Sirainen [Fri, 7 Aug 2015 12:13:34 +0000 (15:13 +0300)] 
dsync: Renamed -F parameter to -O to avoid a conflict
doveadm mail commands already had a generic -F parameter.

10 years agofts-solr: "highest UID for mailbox" lookup was actually returning "highest UID for...
Timo Sirainen [Fri, 7 Aug 2015 10:32:02 +0000 (13:32 +0300)] 
fts-solr: "highest UID for mailbox" lookup was actually returning "highest UID for user"
If the default operator was OR instead of AND. This affected indexing mails
in newly created mailboxes.

10 years agolib: istream-timeout could have triggered timeout too early after long-running code.
Timo Sirainen [Fri, 7 Aug 2015 09:58:30 +0000 (12:58 +0300)] 
lib: istream-timeout could have triggered timeout too early after long-running code.

10 years agofts: If Tika returns 500, retry it a couple of times and then fallback to ignoring...
Timo Sirainen [Fri, 7 Aug 2015 08:31:29 +0000 (11:31 +0300)] 
fts: If Tika returns 500, retry it a couple of times and then fallback to ignoring the problem.

10 years agolib-storage: Make sure tryagain_r is never randomly set in mailbox_search_next_nonblock()
Timo Sirainen [Thu, 6 Aug 2015 19:36:20 +0000 (22:36 +0300)] 
lib-storage: Make sure tryagain_r is never randomly set in mailbox_search_next_nonblock()
This infinite looping in some fts plugin failure situations.

10 years agostats: If process was used for multiple sessions, some of the fields weren't set...
Timo Sirainen [Thu, 6 Aug 2015 09:17:45 +0000 (12:17 +0300)] 
stats: If process was used for multiple sessions, some of the fields weren't set correctly.
For example the second user's disk_output was increased at startup by the
same amount as what the previous user's last disk_output value was.

10 years agolib-storage: escape_char and broken_char settings weren't copied on mailbox_list_create()
Timo Sirainen [Tue, 4 Aug 2015 08:31:17 +0000 (11:31 +0300)] 
lib-storage: escape_char and broken_char settings weren't copied on mailbox_list_create()

10 years agolib-storage: Another fix for doing multiple changes via mailbox_attribute_set/unset
Timo Sirainen [Mon, 20 Jul 2015 07:33:39 +0000 (10:33 +0300)] 
lib-storage: Another fix for doing multiple changes via mailbox_attribute_set/unset

10 years agolib-mail: Fixed message_part_to_idx()
Timo Sirainen [Sun, 19 Jul 2015 13:45:23 +0000 (16:45 +0300)] 
lib-mail: Fixed message_part_to_idx()

10 years agopop3-migration: Compiling fix in some systems
Timo Sirainen [Sun, 19 Jul 2015 13:21:04 +0000 (16:21 +0300)] 
pop3-migration: Compiling fix in some systems

10 years agolib-storage: Fixed doing multiple changes via mailbox_attribute_set/unset()
Timo Sirainen [Sun, 19 Jul 2015 07:57:26 +0000 (10:57 +0300)] 
lib-storage: Fixed doing multiple changes via mailbox_attribute_set/unset()
Only the last change was committed and the earlier changes were just leaking
memory.

10 years agopop3-migration: Fetch physical sizes instead of virtual sizes so pop3c uses LIST
Timo Sirainen [Thu, 16 Jul 2015 16:37:22 +0000 (19:37 +0300)] 
pop3-migration: Fetch physical sizes instead of virtual sizes so pop3c uses LIST
4bebfbb32410 caused the fetching to break entirely.

10 years agopop3-migration: Use LIST instead of RETRs to get the messages' sizes.
Timo Sirainen [Thu, 16 Jul 2015 15:10:12 +0000 (18:10 +0300)] 
pop3-migration: Use LIST instead of RETRs to get the messages' sizes.

10 years agolib-mail: Updated test-message-header-parser unit test
Timo Sirainen [Thu, 16 Jul 2015 15:09:17 +0000 (18:09 +0300)] 
lib-mail: Updated test-message-header-parser unit test

10 years agopop3-migration: Truncate header if there's line containing only CR(s).
Timo Sirainen [Thu, 16 Jul 2015 15:08:40 +0000 (18:08 +0300)] 
pop3-migration: Truncate header if there's line containing only CR(s).
This fixes matching IMAP <-> POP3 messages when the servers behave
differently.

10 years agopop3-migration: Show the first message's number and UIDL which wasn't found from...
Timo Sirainen [Tue, 14 Jul 2015 13:08:24 +0000 (15:08 +0200)] 
pop3-migration: Show the first message's number and UIDL which wasn't found from IMAP.

10 years agolib-storage: If mailboxes' vsizes are used, keep them updated also in mailbox list...
Timo Sirainen [Sat, 11 Jul 2015 09:16:56 +0000 (12:16 +0300)] 
lib-storage: If mailboxes' vsizes are used, keep them updated also in mailbox list index.
This allows looking them up quickly without opening the actual mailbox
indexes.

10 years agoquota: Use MAILBOX_METADATA_PHYSICAL_SIZE for recalculating mailbox's size.
Timo Sirainen [Sat, 11 Jul 2015 09:14:48 +0000 (12:14 +0300)] 
quota: Use MAILBOX_METADATA_PHYSICAL_SIZE for recalculating mailbox's size.

10 years agolib-storage: Added MAILBOX_METADATA_PHYSICAL_SIZE
Timo Sirainen [Sat, 11 Jul 2015 09:11:48 +0000 (12:11 +0300)] 
lib-storage: Added MAILBOX_METADATA_PHYSICAL_SIZE
If backend always uses the same virtual and physical sizes, this is
implemented via the MAILBOX_METADATA_VIRTUAL_SIZE code. Otherwise it
searches all the messages and sums up their physical sizes.

10 years agolib-storage: Moved vsize_hdr_ext_id to struct mailbox for more global access.
Timo Sirainen [Sat, 11 Jul 2015 09:06:44 +0000 (12:06 +0300)] 
lib-storage: Moved vsize_hdr_ext_id to struct mailbox for more global access.

10 years agolib-storage: Renamed struct index_vsize_header to struct mailbox_index_vsize
Timo Sirainen [Sat, 11 Jul 2015 09:03:56 +0000 (12:03 +0300)] 
lib-storage: Renamed struct index_vsize_header to struct mailbox_index_vsize
Also moved the struct to mail-storage-private.h for more global access.

10 years agolib-storage: Moved mailbox vsize calculation code to its own file.
Timo Sirainen [Sat, 11 Jul 2015 09:00:38 +0000 (12:00 +0300)] 
lib-storage: Moved mailbox vsize calculation code to its own file.
No functional differences.

10 years agoquota: Even if quota counting fails, commit the mailbox transaction.
Timo Sirainen [Fri, 3 Jul 2015 10:55:17 +0000 (13:55 +0300)] 
quota: Even if quota counting fails, commit the mailbox transaction.
The only changes in the transaction are changes to dovecot.index.cache file
and we don't want to rollback those.

10 years agoquota: Fixed error handling in quota counting code.
Timo Sirainen [Fri, 3 Jul 2015 10:54:18 +0000 (13:54 +0300)] 
quota: Fixed error handling in quota counting code.
Errors weren't logged and some error checking was missing.

10 years agomdbox: Make sure rebuilding doesn't try to add a copy of the message too many times.
Timo Sirainen [Thu, 2 Jul 2015 09:06:04 +0000 (11:06 +0200)] 
mdbox: Make sure rebuilding doesn't try to add a copy of the message too many times.
Currently it just silently overflowed the 16bit refcount, which caused
problems later.

10 years agoistream-zlib: Don't overwrite parent istream's error on gz header/trailer read errors.
Timo Sirainen [Tue, 30 Jun 2015 11:26:00 +0000 (14:26 +0300)] 
istream-zlib: Don't overwrite parent istream's error on gz header/trailer read errors.

10 years agodoveadm: Added doveadm_username to specify the username for authentication.
Timo Sirainen [Tue, 30 Jun 2015 10:58:15 +0000 (13:58 +0300)] 
doveadm: Added doveadm_username to specify the username for authentication.
The default is still "doveadm" and the server side doesn't currently support
anything except "doveadm".

10 years agoistream filters: If parent's i_stream_stat() fails, copy the stream_errno.
Timo Sirainen [Tue, 30 Jun 2015 09:18:08 +0000 (12:18 +0300)] 
istream filters: If parent's i_stream_stat() fails, copy the stream_errno.
This doesn't actually change any functionality yet, since most
i_stream_stat() callers aren't using i_stream_get_error().

10 years agolib: istream_file.stat() fails, set stream_errno and error string.
Timo Sirainen [Tue, 30 Jun 2015 09:17:35 +0000 (12:17 +0300)] 
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().

10 years agomaster: When sending SIGTERM/SIGKILL to processes, log which services they were sent to.
Timo Sirainen [Tue, 30 Jun 2015 08:26:47 +0000 (11:26 +0300)] 
master: When sending SIGTERM/SIGKILL to processes, log which services they were sent to.

10 years agoimap/pop3-login: If auth failure reason already begins with [resp-code], don't prefix...
Timo Sirainen [Mon, 29 Jun 2015 17:25:15 +0000 (20:25 +0300)] 
imap/pop3-login: If auth failure reason already begins with [resp-code], don't prefix it with another one.

10 years agolib: Fixed unit test with big-endian CPUs.
Timo Sirainen [Mon, 29 Jun 2015 10:36:38 +0000 (13:36 +0300)] 
lib: Fixed unit test with big-endian CPUs.
Patch by Michal Hlavinka / Redhat

10 years agolib: Fixed read buffer overflow in wildcard_match*()
Timo Sirainen [Mon, 29 Jun 2015 10:06:03 +0000 (13:06 +0300)] 
lib: Fixed read buffer overflow in wildcard_match*()
Patch by Hanno Böck.

Note that input to wildard_match*() is always coming only from trusted
sources, like config file or doveadm commands.

10 years agoindexer: Properly fix crashing at deinit when there are pending requests.
Timo Sirainen [Mon, 29 Jun 2015 09:05:25 +0000 (12:05 +0300)] 
indexer: Properly fix crashing at deinit when there are pending requests.

10 years agoindexer: Reverted 5945ba000a45 - it didn't really help
Timo Sirainen [Mon, 29 Jun 2015 09:00:05 +0000 (12:00 +0300)] 
indexer: Reverted 5945ba000a45 - it didn't really help

10 years agoindexer: Fixed crash at deinit if there were still queued requests.
Timo Sirainen [Mon, 29 Jun 2015 08:44:00 +0000 (11:44 +0300)] 
indexer: Fixed crash at deinit if there were still queued requests.

10 years agoimapc: Fixed check to see if prefix!="" in previous commit.
Timo Sirainen [Wed, 24 Jun 2015 05:54:35 +0000 (07:54 +0200)] 
imapc: Fixed check to see if prefix!="" in previous commit.

10 years agolib-storage: Set MAILBOX_SELECT/NONEXISTENT for namespace prefix even if no flags...
Timo Sirainen [Tue, 23 Jun 2015 09:31:21 +0000 (11:31 +0200)] 
lib-storage: Set MAILBOX_SELECT/NONEXISTENT for namespace prefix even if no flags are wanted.
This fixes doveadm commands attempting to access such nonexistent mailbox
prefixes.

10 years agoimapc: Don't return mailbox list entries that would result in name="".
Timo Sirainen [Tue, 23 Jun 2015 09:30:27 +0000 (11:30 +0200)] 
imapc: Don't return mailbox list entries that would result in name="".
So basically don't return namespace prefix if imapc_list_prefix="".

10 years agoimapc: If login is aborted at deinit, don't log an error.
Timo Sirainen [Tue, 23 Jun 2015 09:12:38 +0000 (11:12 +0200)] 
imapc: If login is aborted at deinit, don't log an error.

10 years agoimapc: Don't automatically login to IMAP server for list=no namespaces.
Timo Sirainen [Tue, 23 Jun 2015 09:02:20 +0000 (11:02 +0200)] 
imapc: Don't automatically login to IMAP server for list=no namespaces.

10 years agolib-http: http_client_request_send() failure returned already-freed error string.
Timo Sirainen [Thu, 18 Jun 2015 08:10:05 +0000 (11:10 +0300)] 
lib-http: http_client_request_send() failure returned already-freed error string.

10 years agofs-posix: Hide temporary files from fs_iter_*()
Timo Sirainen [Wed, 17 Jun 2015 13:37:37 +0000 (16:37 +0300)] 
fs-posix: Hide temporary files from fs_iter_*()
Those could exist just because another process is just using them to create
new files to the directory. Although they could also be older files caused
by earlier crashes. It would probably be a good idea to have fs_iter_*()
delete the old temporary files automatically.

10 years agovirtual: virtual_uids weren't always set to all mails, causing missing mails and...
Timo Sirainen [Wed, 17 Jun 2015 11:25:48 +0000 (14:25 +0300)] 
virtual: virtual_uids weren't always set to all mails, causing missing mails and crashes in search.

10 years agovirtual: Added more asserts when DEBUG is enabled.
Timo Sirainen [Wed, 17 Jun 2015 11:24:06 +0000 (14:24 +0300)] 
virtual: Added more asserts when DEBUG is enabled.

10 years agovirtual: Added more asserts.
Timo Sirainen [Wed, 17 Jun 2015 11:23:38 +0000 (14:23 +0300)] 
virtual: Added more asserts.

10 years agofts-solr: Avoid sending too large queries to Solr due to listing wanted mailboxes.
Timo Sirainen [Wed, 17 Jun 2015 11:04:42 +0000 (14:04 +0300)] 
fts-solr: Avoid sending too large queries to Solr due to listing wanted mailboxes.
This is mainly a problem if there are a lot of mailboxes and "All Mails"
virtual mailbox. For now hardcoded to send max 10 mailboxes in the query,
afterwards it just returns matches in all the mailboxes and we'll filter out
the unwanted mailboxes.

10 years agofts-solr: Removed assert to fix indexing multiple mailboxes.
Timo Sirainen [Wed, 17 Jun 2015 10:55:37 +0000 (13:55 +0300)] 
fts-solr: Removed assert to fix indexing multiple mailboxes.
fts plugin may want to do last-uid lookup for a new mailbox while we still
have posting open for the previous one.

10 years agofts-tika: Fixed crashes when indexing larger attachments with fts-solr.
Timo Sirainen [Wed, 17 Jun 2015 10:12:37 +0000 (13:12 +0300)] 
fts-tika: Fixed crashes when indexing larger attachments with fts-solr.
We were mixing ioloops without switching back to the original ioloop in the
middle. Also io_remove() at deinit caused another timeout to be added, so
this needs to be done while original ioloop is active or we'll just leak the
just-added timeout in io_loop_destroy() and crash later.

10 years agolib-fs: Removed redundant o_stream_nfinish() calls
Timo Sirainen [Wed, 17 Jun 2015 09:22:17 +0000 (12:22 +0300)] 
lib-fs: Removed redundant o_stream_nfinish() calls

10 years agolib-fs: Call o_stream_nfinish() automatically for all backends in fs_write_stream_fin...
Timo Sirainen [Wed, 17 Jun 2015 09:21:52 +0000 (12:21 +0300)] 
lib-fs: Call o_stream_nfinish() automatically for all backends in fs_write_stream_finish()
Otherwise each backend needs to do it internally. fs-metawrap for example
was missing this and causing assert-crashes.

10 years agolib: test-data-stack - simplify #if-ing out of DEBUG-only fatal test
Phil Carmody [Wed, 17 Jun 2015 08:42:53 +0000 (11:42 +0300)] 
lib: test-data-stack - simplify #if-ing out of DEBUG-only fatal test
With no canaries, nothing can be tested, so just reduce this to a trivial
1-line return on the non-DEBUG case.

Signed-off-by: Phil Carmody <phil@dovecot.fi>
10 years agolib: test-data-stack - ensure t_push() and t_pop() are balanced in fatal tests
Phil Carmody [Wed, 17 Jun 2015 08:42:30 +0000 (11:42 +0300)] 
lib: test-data-stack - ensure t_push() and t_pop() are balanced in fatal tests
If the t_pop() unexpectedly succeeds, we won't want to do another one upon
entering the function again.

Signed-off-by: Phil Carmody <phil@dovecot.fi>
10 years agoauth: Added allow_real_nets setting.
Timo Sirainen [Wed, 17 Jun 2015 08:31:02 +0000 (11:31 +0300)] 
auth: Added allow_real_nets setting.
The difference to allow_nets is that it matches against the connection's
"real IP" rather than what the connection told was the original client's IP
address (%{rip} vs %{real_rip})

10 years agolib: Added unix_client_connect_msecs setting to connection API.
Timo Sirainen [Tue, 16 Jun 2015 14:19:12 +0000 (17:19 +0300)] 
lib: Added unix_client_connect_msecs setting to connection API.

10 years agolib: Compiler warning fix for test-ostream-failure-at.
Timo Sirainen [Tue, 16 Jun 2015 13:56:08 +0000 (16:56 +0300)] 
lib: Compiler warning fix for test-ostream-failure-at.

10 years agolib-fs: Added "randomfail" driver.
Timo Sirainen [Tue, 16 Jun 2015 13:40:29 +0000 (16:40 +0300)] 
lib-fs: Added "randomfail" driver.
Using this in front of fs drivers allows randomly injecting failures. For
example:

mail_attachment_fs = randomfail:all=10,read=30,read-range=2000-3000:sis posix

This means that all FS operations have a 10% chance of failing, except reads
have a 30% chance of failing. If the read fails, it'll fail somewhere
between offsets 2000-3000 (the default is 0, so it'll fail at the start of
file).

The supported operations are: wait metadata prefetch read write lock exists
stat copy rename delete iter. "all" applies to all of them.

The supported ranges are: read-range, write-range, iter-range.

10 years agolib: Added o_stream_create_failure_at() to inject EIO at given offset in ostream
Timo Sirainen [Tue, 16 Jun 2015 13:22:18 +0000 (16:22 +0300)] 
lib: Added o_stream_create_failure_at() to inject EIO at given offset in ostream

10 years agolib: Added i_stream_create_failure_at() to inject EIO at given offset in istream.
Timo Sirainen [Tue, 16 Jun 2015 13:21:56 +0000 (16:21 +0300)] 
lib: Added i_stream_create_failure_at() to inject EIO at given offset in istream.

10 years agodsync: If we stop because of a signal, log a warning about it.
Timo Sirainen [Tue, 16 Jun 2015 11:12:59 +0000 (14:12 +0300)] 
dsync: If we stop because of a signal, log a warning about it.

10 years agodoveadm: Added doveadm_killed_signo()
Timo Sirainen [Tue, 16 Jun 2015 11:12:33 +0000 (14:12 +0300)] 
doveadm: Added doveadm_killed_signo()

10 years agofts: Avoid expanding mail_search_args multiple times (for optimization & crash-avoidance)
Timo Sirainen [Mon, 15 Jun 2015 21:29:07 +0000 (00:29 +0300)] 
fts: Avoid expanding mail_search_args multiple times (for optimization & crash-avoidance)
Primarily this fixes the crash:

index-search-result.c: line 132 (index_search_result_update_flags):
assertion failed: (result->search_args->args == &search_arg)

It could be triggered by:
a search return (update) body body seen
b store 1 +flags \seen
c store 1 -flags \seen

10 years agofs-posix: fs_copy() didn't work with prefix= parameter
Timo Sirainen [Mon, 15 Jun 2015 21:16:42 +0000 (00:16 +0300)] 
fs-posix: fs_copy() didn't work with prefix= parameter

10 years agolib-stats: fix tristate-int vs. bool return value confusion
Phil Carmody [Mon, 15 Jun 2015 11:55:03 +0000 (14:55 +0300)] 
lib-stats: fix tristate-int vs. bool return value confusion
-1 was being silently converted to true. However, this was an error condition.

The callers don't need anything more complex than a bool, so kill the int.

Signed-off-by: Phil Carmody <phil@dovecot.fi>
10 years agolib-fts: use NULL rather than 0 to shut up sparse
Phil Carmody [Mon, 15 Jun 2015 11:55:01 +0000 (14:55 +0300)] 
lib-fts: use NULL rather than 0 to shut up sparse
Signed-off-by: Phil Carmody <phil@dovecot.fi>
10 years agodirector: explicitly mark _disconnect() helper static to match proto
Phil Carmody [Mon, 15 Jun 2015 11:54:58 +0000 (14:54 +0300)] 
director: explicitly mark _disconnect() helper static to match proto
No functional change, compiler would not have exported the symbol, this
just shuts up sparse.

Signed-off-by: Phil Carmody <phil@dovecot.fi>
10 years agofs-metawrap: If written file unexpectedly shrinks, return error instead of assert...
Timo Sirainen [Mon, 15 Jun 2015 11:51:46 +0000 (14:51 +0300)] 
fs-metawrap: If written file unexpectedly shrinks, return error instead of assert-crash.
This shouldn't be happening, but we can't fully control it so an error is
better.

10 years agofs-metawrap: Don't assert-crash when writing an empty file.
Timo Sirainen [Mon, 15 Jun 2015 11:49:46 +0000 (14:49 +0300)] 
fs-metawrap: Don't assert-crash when writing an empty file.

10 years agolib-fts: Fix comment in fts-filter.h
Teemu Huovila [Mon, 15 Jun 2015 11:35:25 +0000 (14:35 +0300)] 
lib-fts: Fix comment in fts-filter.h

10 years agolib: test-failures - tests get/set handlers and the various log levels
Phil Carmody [Mon, 15 Jun 2015 11:31:19 +0000 (14:31 +0300)] 
lib: test-failures - tests get/set handlers and the various log levels
Also indirectoy tests the new lib-test test_expect* family.

Signed-off-by: Phil Carmody <phil@dovecot.fi>
10 years agolib-test: test_expect_error_string() to match a single known message
Phil Carmody [Mon, 15 Jun 2015 11:31:19 +0000 (14:31 +0300)] 
lib-test: test_expect_error_string() to match a single known message
This gives us very fine control over what is acceptable as an expected warning.
Alas you have to do it for each message individually.

Signed-off-by: Phil Carmody <phil@dovecot.fi>
10 years agolib-test: let tests invoke i_warning/i_error behaviour
Phil Carmody [Mon, 15 Jun 2015 11:31:19 +0000 (14:31 +0300)] 
lib-test: let tests invoke i_warning/i_error behaviour
Error-handling paths should be testable too. Permit a test case to register
that a known number of warnings/errors are to be expected, and to verify
that those warnings did occur afterwards. Too many messages will fail the
test exactly as it did in the past, they're unexpected messages. However,
too few messages will also cause the test case to fail.

Signed-off-by: Phil Carmody <phil@dovecot.fi>
10 years agolib-test: flush test-assert failure messages
Phil Carmody [Mon, 15 Jun 2015 11:31:19 +0000 (14:31 +0300)] 
lib-test: flush test-assert failure messages
Diagnostic output to stderr may overtake these stdout logs if the streams
are combined by the shell or on the console. fflush() might help realign
them.

Signed-off-by: Phil Carmody <phil@dovecot.fi>
10 years agolib: array - permit array_swap with uninitialised arrays
Phil Carmody [Mon, 15 Jun 2015 11:25:07 +0000 (14:25 +0300)] 
lib: array - permit array_swap with uninitialised arrays
Before initialisation, all fields are blank, so the element_size field
is not the actual size, and the i_assert would fire.

Signed-off-by: Phil Carmody <phil@dovecot.fi>
10 years agolib-index: Added mail_index_ext_register_resize_defaults()
Timo Sirainen [Sat, 13 Jun 2015 14:05:49 +0000 (17:05 +0300)] 
lib-index: Added mail_index_ext_register_resize_defaults()

10 years agocassandra: Commit failures returned an already freed error string.
Timo Sirainen [Sat, 13 Jun 2015 13:46:06 +0000 (16:46 +0300)] 
cassandra: Commit failures returned an already freed error string.

10 years agolib-fts: Removed unnecessary data stack frames from test-fts-filter.
Timo Sirainen [Sat, 13 Jun 2015 12:10:23 +0000 (15:10 +0300)] 
lib-fts: Removed unnecessary data stack frames from test-fts-filter.
They are already added by lib-test/test-common.c

10 years agoconfig: Added hook_config_parser_end for plugins.
Timo Sirainen [Sat, 13 Jun 2015 11:36:43 +0000 (14:36 +0300)] 
config: Added hook_config_parser_end for plugins.

10 years agodoveadm mailbox delete -r: Delete all mailboxes when empty mailbox name is given.
Timo Sirainen [Fri, 12 Jun 2015 12:14:52 +0000 (15:14 +0300)] 
doveadm mailbox delete -r: Delete all mailboxes when empty mailbox name is given.

10 years agolib-fts: Don't crash if fts_icu_*() are used after fts_icu_deinit()
Timo Sirainen [Fri, 12 Jun 2015 10:02:08 +0000 (13:02 +0300)] 
lib-fts: Don't crash if fts_icu_*() are used after fts_icu_deinit()

10 years agolib-index: Avoid writing tail offset update to transaction log if it's not necessary.
Timo Sirainen [Thu, 11 Jun 2015 16:21:16 +0000 (19:21 +0300)] 
lib-index: Avoid writing tail offset update to transaction log if it's not necessary.
This should avoid extra writes that do nothing but update the tail offset.
mdbox's map requires this behavior, so disable it for it. For others it
might cause the next sync to read more data unnecessarily, but it should be
worth the extra cost of write most of the times.

10 years agodoveadm fetch: Added "refcount" field.
Timo Sirainen [Thu, 11 Jun 2015 16:08:13 +0000 (19:08 +0300)] 
doveadm fetch: Added "refcount" field.

10 years agocassandra: Error handling cleanup.
Timo Sirainen [Thu, 11 Jun 2015 13:19:05 +0000 (16:19 +0300)] 
cassandra: Error handling cleanup.
Probably doesn't fix any actual bugs.

10 years agocassandra: Minor code cleanup to make sure we don't try to access freed transaction...
Timo Sirainen [Thu, 11 Jun 2015 12:28:46 +0000 (15:28 +0300)] 
cassandra: Minor code cleanup to make sure we don't try to access freed transaction memory.

10 years agocassandra: Don't access freed memory when doing an assert-check.
Timo Sirainen [Thu, 11 Jun 2015 12:28:05 +0000 (15:28 +0300)] 
cassandra: Don't access freed memory when doing an assert-check.

10 years agodoveadm fs delete -R: More fixes to handling errors without crashing.
Timo Sirainen [Thu, 11 Jun 2015 12:19:53 +0000 (15:19 +0300)] 
doveadm fs delete -R: More fixes to handling errors without crashing.

10 years agolmtp: Fixed assert-crash on anvil lookup failures.
Timo Sirainen [Wed, 10 Jun 2015 17:29:35 +0000 (20:29 +0300)] 
lmtp: Fixed assert-crash on anvil lookup failures.
If anvil_client_query() fails, it immediately calls the callback and returns
NULL. So we need to increase anvil_queries even before calling
anvil_client_query()

10 years agodoveadm fs delete -R: Fixed hang when some of the deletions failed.
Timo Sirainen [Wed, 10 Jun 2015 16:50:29 +0000 (19:50 +0300)] 
doveadm fs delete -R: Fixed hang when some of the deletions failed.

10 years agocassandra: If log_level=debug/trace, log each query and its result.
Timo Sirainen [Wed, 10 Jun 2015 13:18:10 +0000 (16:18 +0300)] 
cassandra: If log_level=debug/trace, log each query and its result.