]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
9 years agolib-http: client/server: Enable the TCP_NODELAY option for all connections.
Stephan Bosch [Thu, 16 Jun 2016 20:02:08 +0000 (22:02 +0200)] 
lib-http: client/server: Enable the TCP_NODELAY option for all connections.

This disables the TCP Nagle algorithm. With the Nagle algorithm enabled, TCP waits a little to accumulate more data in a small segment before it is sent. For transfer of large continuous payloads, this is not useful and even harmful.
If the final remaining bit of the payload is small, the TCP layer will wait for a significant amount of time at the end of the payload. For many sequential transfers, this amounts to much waiting time.
This is particularly evident in the test-http-payload test suite tool. Setting TCP_NODELAY decreases its run time from up to 20 minutes to about half a minute my system.

9 years agolib: Created net_set_tcp_nodelay(), which enables the TCP_NODELAY socket option.
Stephan Bosch [Thu, 16 Jun 2016 20:01:06 +0000 (22:01 +0200)] 
lib: Created net_set_tcp_nodelay(), which enables the TCP_NODELAY socket option.

This disables the TCP Nagle algorithm.

9 years agolib-ssl-iostream: Changed require_valid_cert -> allow_invalid_cert
Timo Sirainen [Thu, 16 Jun 2016 08:23:16 +0000 (11:23 +0300)] 
lib-ssl-iostream: Changed require_valid_cert -> allow_invalid_cert

We should default to being safe.

9 years agolib-http: client: Added test for http_client_request_delay_msecs() in test_http_clien...
Stephan Bosch [Tue, 14 Jun 2016 20:47:31 +0000 (22:47 +0200)] 
lib-http: client: Added test for http_client_request_delay_msecs() in test_http_client_errors.

9 years agolib-http: client: Added more debug logging about the submission of delayed requests.
Stephan Bosch [Tue, 14 Jun 2016 23:54:25 +0000 (01:54 +0200)] 
lib-http: client: Added more debug logging about the submission of delayed requests.

9 years agotime-util: Fixed usec comparison in timeval_cmp_margin().
Stephan Bosch [Tue, 14 Jun 2016 23:53:44 +0000 (01:53 +0200)] 
time-util: Fixed usec comparison in timeval_cmp_margin().

9 years agolib-dcrypt: Fix error_r pointer verification.
Teemu Huovila [Tue, 14 Jun 2016 19:42:09 +0000 (22:42 +0300)] 
lib-dcrypt: Fix error_r pointer verification.

9 years agolib-fs: Added write_bytes to statistics
Timo Sirainen [Tue, 14 Jun 2016 19:32:36 +0000 (22:32 +0300)] 
lib-fs: Added write_bytes to statistics

9 years agodcrypt: Arm deinitialization code
Aki Tuomi [Tue, 14 Jun 2016 09:30:27 +0000 (12:30 +0300)] 
dcrypt: Arm deinitialization code

9 years agodcrypt: Add test for public key loading
Aki Tuomi [Tue, 14 Jun 2016 09:08:49 +0000 (12:08 +0300)] 
dcrypt: Add test for public key loading

9 years agodcrypt-openssl: Pass pointer safely
Aki Tuomi [Tue, 14 Jun 2016 09:08:34 +0000 (12:08 +0300)] 
dcrypt-openssl: Pass pointer safely

9 years agolib-index: Fixed test-mail-index-sync-ext
Timo Sirainen [Tue, 14 Jun 2016 07:49:24 +0000 (10:49 +0300)] 
lib-index: Fixed test-mail-index-sync-ext

9 years agolib-index: Fixes to handling resized records.
Timo Sirainen [Mon, 13 Jun 2016 22:14:13 +0000 (01:14 +0300)] 
lib-index: Fixes to handling resized records.

9 years agodict: Increased max number of pipelined requests from 5 to 1000.
Timo Sirainen [Mon, 13 Jun 2016 17:16:14 +0000 (20:16 +0300)] 
dict: Increased max number of pipelined requests from 5 to 1000.

The client is supposed to be the one throttling the requests. We mainly
want to avoid accidental abuses. Using 1000 is hopefully "large enough"
without being "too large".

9 years agodict: Avoid potentially using 100% CPU
Timo Sirainen [Mon, 13 Jun 2016 14:59:01 +0000 (17:59 +0300)] 
dict: Avoid potentially using 100% CPU

Continuing 65c570f18 fix.

9 years agolib-fs: Added fs_switch_ioloop()
Timo Sirainen [Mon, 13 Jun 2016 14:11:28 +0000 (17:11 +0300)] 
lib-fs: Added fs_switch_ioloop()

9 years agolib-fs: Code cleanup for fs-sis: Use struct fs.parent
Timo Sirainen [Mon, 13 Jun 2016 14:31:34 +0000 (17:31 +0300)] 
lib-fs: Code cleanup for fs-sis: Use struct fs.parent

9 years agolib-dcrypt: Use hex encoded public key ID in callback
Aki Tuomi [Mon, 13 Jun 2016 09:49:19 +0000 (12:49 +0300)] 
lib-dcrypt: Use hex encoded public key ID in callback

9 years agolib-dcrypt: Use dcrypt_key_id_private when applicable
Aki Tuomi [Mon, 13 Jun 2016 09:44:09 +0000 (12:44 +0300)] 
lib-dcrypt: Use dcrypt_key_id_private when applicable

9 years agoldap: Fix cyclic dependency
Aki Tuomi [Wed, 11 May 2016 05:02:29 +0000 (08:02 +0300)] 
ldap: Fix cyclic dependency

9 years agodovecot-config: Add lib-dcrypt to LIBDOVECOT_INCLUDE
Timo Sirainen [Mon, 13 Jun 2016 09:18:07 +0000 (12:18 +0300)] 
dovecot-config: Add lib-dcrypt to LIBDOVECOT_INCLUDE

Since lib-dcrypt is part of libdovecot.

9 years agomaster: make setting listen empty an error
Martti Rannanjärvi [Thu, 19 May 2016 08:14:46 +0000 (11:14 +0300)] 
master: make setting listen empty an error

9 years agolib-fs: fs_wait_async() can't fail, so make it return void.
Timo Sirainen [Mon, 6 Jun 2016 07:28:18 +0000 (10:28 +0300)] 
lib-fs: fs_wait_async() can't fail, so make it return void.

The individual requests can timeout, but not the waiting itself.

9 years agolmtp: Don't permanently allocate from data stack during init.
Timo Sirainen [Mon, 13 Jun 2016 06:56:20 +0000 (09:56 +0300)] 
lmtp: Don't permanently allocate from data stack during init.

9 years agolib-index: mail_index_ext_resize() was broken when record_size wasn't changed.
Timo Sirainen [Sun, 12 Jun 2016 17:11:49 +0000 (20:11 +0300)] 
lib-index: mail_index_ext_resize() was broken when record_size wasn't changed.

9 years agolib-dcrypt: Fix various problems
Aki Tuomi [Sun, 12 Jun 2016 15:57:10 +0000 (18:57 +0300)] 
lib-dcrypt: Fix various problems

9 years agolib-mail: Improved message-parser unit tests.
Timo Sirainen [Sat, 11 Jun 2016 18:23:57 +0000 (21:23 +0300)] 
lib-mail: Improved message-parser unit tests.

9 years agolib-mail: Fixed message_parser_init_from_parts() with truncated MIME headers
Timo Sirainen [Sat, 11 Jun 2016 18:23:07 +0000 (21:23 +0300)] 
lib-mail: Fixed message_parser_init_from_parts() with truncated MIME headers

9 years agolib-mail: message-header-parser now keeps istream referenced.
Timo Sirainen [Sat, 11 Jun 2016 18:20:37 +0000 (21:20 +0300)] 
lib-mail: message-header-parser now keeps istream referenced.

9 years agolib-storage: mail_set_cache_corrupted*() now sets internal error to storage.
Timo Sirainen [Sat, 11 Jun 2016 17:50:39 +0000 (20:50 +0300)] 
lib-storage: mail_set_cache_corrupted*() now sets internal error to storage.

At least index_mail_set_message_parts_corrupted() assumed that this was
being done.

9 years agodoveadm: Don't use already-freed data stack after init.
Timo Sirainen [Sat, 11 Jun 2016 17:36:51 +0000 (20:36 +0300)] 
doveadm: Don't use already-freed data stack after init.

Broken by 0679f8a70.

9 years agocassandra: Try fallback_consistency also for write timeout failures.
Timo Sirainen [Sat, 11 Jun 2016 14:13:12 +0000 (17:13 +0300)] 
cassandra: Try fallback_consistency also for write timeout failures.

9 years agodoveadm-server: Disable idle timeout for now
Aki Tuomi [Tue, 7 Jun 2016 05:50:12 +0000 (08:50 +0300)] 
doveadm-server: Disable idle timeout for now

9 years agoFixed linking with OSX.
Timo Sirainen [Tue, 7 Jun 2016 00:47:44 +0000 (03:47 +0300)] 
Fixed linking with OSX.

9 years ago-Wstrict-bool warning fixes
Timo Sirainen [Tue, 7 Jun 2016 00:41:18 +0000 (03:41 +0300)] 
-Wstrict-bool warning fixes

9 years agolib-dcrypt: Fixed library dependencies
Timo Sirainen [Tue, 7 Jun 2016 00:25:16 +0000 (03:25 +0300)] 
lib-dcrypt: Fixed library dependencies

_DEPENDENCIES needs an explicit paths, not "-lssl" and such. Fixes building
with e.g. OSX.

9 years agolib-lda: Don't assert-crash if home directory isn't set.
Timo Sirainen [Tue, 7 Jun 2016 00:04:32 +0000 (03:04 +0300)] 
lib-lda: Don't assert-crash if home directory isn't set.

9 years agolib-mail: Fixed to 91fdb25b5
Timo Sirainen [Mon, 6 Jun 2016 14:10:12 +0000 (17:10 +0300)] 
lib-mail: Fixed to 91fdb25b5

Caused by my manual edits to avoid the -Wstrict-bool warnings.

9 years agolib-master: Add automatic data stack frame to init unless disabled.
Timo Sirainen [Fri, 3 Jun 2016 19:23:00 +0000 (22:23 +0300)] 
lib-master: Add automatic data stack frame to init unless disabled.

9 years agombox: mbox_index_header.dirty_flag isn't boolean, so don't use TRUE/FALSE with it.
Timo Sirainen [Sun, 5 Jun 2016 14:17:12 +0000 (17:17 +0300)] 
mbox: mbox_index_header.dirty_flag isn't boolean, so don't use TRUE/FALSE with it.

9 years agolib: define FALSE to be (!1)
Timo Sirainen [Sun, 5 Jun 2016 13:54:38 +0000 (16:54 +0300)] 
lib: define FALSE to be (!1)

This allows the patched clang to treat FALSE as a boolean expression.

9 years agoglobal: Use only explicit int -> bool conversions
Timo Sirainen [Sun, 5 Jun 2016 13:35:04 +0000 (16:35 +0300)] 
global: Use only explicit int -> bool conversions

These were checked with a patched clang.

9 years agoglobal: Require comparisons to be strict boolean expressions
Timo Sirainen [Sun, 5 Jun 2016 02:06:27 +0000 (05:06 +0300)] 
global: Require comparisons to be strict boolean expressions

 * No implicit integer -> boolean or pointer -> boolean conversions
 * !expr can be used only if expr is boolean type

These were checked with a patched clang. It found various actual bugs,
which were fixed by the previous commits.

9 years agoglobal: uint32_t:1 -> bool:1
Timo Sirainen [Sun, 5 Jun 2016 13:30:47 +0000 (16:30 +0300)] 
global: uint32_t:1 -> bool:1

They were uint32_t because I wanted to be sure that there wouldn't be any
padding added to the struct. But this should be true also with bool:1.

9 years agoglobal: unsigned int:1 -> bool:1
Timo Sirainen [Sun, 5 Jun 2016 11:37:11 +0000 (14:37 +0300)] 
global: unsigned int:1 -> bool:1

perl -i -pe 's/unsigned int ([^,:;]+):1;/bool $1:1;/' **/*.[ch]

9 years agombox: Code cleanup - use bool instead of int for tracking locked-status
Timo Sirainen [Sun, 5 Jun 2016 13:01:05 +0000 (16:01 +0300)] 
mbox: Code cleanup - use bool instead of int for tracking locked-status

9 years agolib: remove autoclose parameter from [io]_stream_create_fd
Martti Rannanjärvi [Mon, 9 May 2016 11:28:08 +0000 (14:28 +0300)] 
lib: remove autoclose parameter from [io]_stream_create_fd

Use [io]_stream_create_fd_autoclose() for autoclose.

9 years agoquota: Differentiate between forced and non-forced quota recalc
Timo Sirainen [Mon, 2 May 2016 15:27:02 +0000 (18:27 +0300)] 
quota: Differentiate between forced and non-forced quota recalc

The "count" backend doesn't need to recalc quota unless an explicit "doveadm
quota recalc" command is called.

9 years agoquota: Skip reading mail sizes when quota backend doesn't need it.
Timo Sirainen [Mon, 2 May 2016 15:16:00 +0000 (18:16 +0300)] 
quota: Skip reading mail sizes when quota backend doesn't need it.

If quota backend is updating the quota internally, it's just going to ignore
the looked up size. The only reason for looking up the sizes is to check
with quota_try_alloc() whether user is going over quota.

9 years agolib-mail: Update tests for message address
Pali Rohár [Sun, 5 Jun 2016 13:48:20 +0000 (15:48 +0200)] 
lib-mail: Update tests for message address

9 years agolib-mail: message_address_write: Quote and escape strings if needed
Pali Rohár [Sun, 5 Jun 2016 13:48:19 +0000 (15:48 +0200)] 
lib-mail: message_address_write: Quote and escape strings if needed

ATEXT characters must be properly quoted when are in phrase.

Test case:

  { name = "test\"test", mailbox = "user", domain = "host" }

converts to:

  "test\"test" <user@host>

9 years agolib-mail: parse_mailbox: Set display name instead mailbox when parsing failed
Pali Rohár [Sun, 5 Jun 2016 13:48:18 +0000 (15:48 +0200)] 
lib-mail: parse_mailbox: Set display name instead mailbox when parsing failed

It does not make sense to set mailbox without domain on incorrect input.
Rather set display name which is more likely useable value.

Test case:

  test

is parsed as:

  { name = "test", mailbox = NULL, domain = NULL }

9 years agolib-mail: parse_addr_spec: Email address without local-part is invalid
Pali Rohár [Sun, 5 Jun 2016 13:48:17 +0000 (15:48 +0200)] 
lib-mail: parse_addr_spec: Email address without local-part is invalid

Add explicit invalid_syntax flag also when end of input occure because
address is without domain invalid and in this case it was not correctly
propagated.

9 years agolib-mail: parse_addr_spec: Like in rfc822_skip_comment() check if last_comment is...
Pali Rohár [Sun, 5 Jun 2016 13:48:16 +0000 (15:48 +0200)] 
lib-mail: parse_addr_spec: Like in rfc822_skip_comment() check if last_comment is not NULL

This will fix possible NULL pointer dereference when caller does not set last_comment.

9 years agolib-mail: message_address_write: Fix generating group list with empty name
Pali Rohár [Sun, 5 Jun 2016 13:48:15 +0000 (15:48 +0200)] 
lib-mail: message_address_write: Fix generating group list with empty name

Empty name for group list must be quoted.

Test case:

  { { name = NULL, mailbox = "", domain = NULL }, { name = NULL, mailbox = NULL, domain = NULL } }

converts to:

  "":;

9 years agolib-mail: message_address_write: Fix generating empty group list
Pali Rohár [Sun, 5 Jun 2016 13:48:14 +0000 (15:48 +0200)] 
lib-mail: message_address_write: Fix generating empty group list

Empty group list ends with ": " not with ", ".

Test case:

  { { name = NULL, mailbox = "group", domain = NULL }, { name = NULL, mailbox = NULL, domain = NULL } }

converts to:

  group:;

9 years agofs-randomfail: Support failures after asynchronous commands have already finished.
Timo Sirainen [Sun, 5 Jun 2016 23:27:35 +0000 (02:27 +0300)] 
fs-randomfail: Support failures after asynchronous commands have already finished.

9 years agodict: Fixed hang when pipelining multiple commands.
Timo Sirainen [Sun, 5 Jun 2016 23:26:09 +0000 (02:26 +0300)] 
dict: Fixed hang when pipelining multiple commands.

9 years agolib-index: Extension record size resizing was still broken.
Timo Sirainen [Sun, 5 Jun 2016 21:07:53 +0000 (00:07 +0300)] 
lib-index: Extension record size resizing was still broken.

Fixes assert-crash:
Panic: file mail-index-util.c: line 143 (mail_index_seq_array_add): assertion failed: (array->arr.element_size == sizeof(seq) + aligned_record_size)

9 years agoglobal: More fixes to mismatched bool vs int handling
Timo Sirainen [Sun, 5 Jun 2016 14:48:41 +0000 (17:48 +0300)] 
global: More fixes to mismatched bool vs int handling

9 years agoglobal: Fixed mismatched bool vs. int/pointer handling
Timo Sirainen [Sun, 5 Jun 2016 12:37:06 +0000 (15:37 +0300)] 
global: Fixed mismatched bool vs. int/pointer handling

I don't think these fix any actual bugs.

9 years agolib-mail: Added comment about invalid timezones in message_date_parse()
Timo Sirainen [Sun, 5 Jun 2016 13:51:12 +0000 (16:51 +0300)] 
lib-mail: Added comment about invalid timezones in message_date_parse()

9 years agodirector: Fixed error handling when directors support incompatible tags
Timo Sirainen [Sun, 5 Jun 2016 13:40:27 +0000 (16:40 +0300)] 
director: Fixed error handling when directors support incompatible tags

Connection should have been disconnected immediately, not after the next
command that would have produced "Incompatible protocol".

9 years agolib-dcrypt: Fixed error handling in dcrypt_key_id_public()
Timo Sirainen [Sun, 5 Jun 2016 12:57:48 +0000 (15:57 +0300)] 
lib-dcrypt: Fixed error handling in dcrypt_key_id_public()

9 years agolib-storage: Fixed error handling in list=children checking
Timo Sirainen [Sun, 5 Jun 2016 12:35:13 +0000 (15:35 +0300)] 
lib-storage: Fixed error handling in list=children checking

9 years agofts-lucene: Fixed error handling when checking if settings had changed.
Timo Sirainen [Sun, 5 Jun 2016 12:32:09 +0000 (15:32 +0300)] 
fts-lucene: Fixed error handling when checking if settings had changed.

9 years agomailbox-alias plugin: Fixed error handling
Timo Sirainen [Sun, 5 Jun 2016 12:31:20 +0000 (15:31 +0300)] 
mailbox-alias plugin: Fixed error handling

9 years agolib-storage: Search args equalness checks didn't compare keywords correctly.
Timo Sirainen [Sun, 5 Jun 2016 12:26:11 +0000 (15:26 +0300)] 
lib-storage: Search args equalness checks didn't compare keywords correctly.

This may have broken the search in some situations.

9 years agombox: Fixed expunging first mail with CRLF linefeeds.
Timo Sirainen [Sun, 5 Jun 2016 12:23:45 +0000 (15:23 +0300)] 
mbox: Fixed expunging first mail with CRLF linefeeds.

9 years agomdbox: Fix want_altpath flags/boolean mixup
Timo Sirainen [Sun, 5 Jun 2016 12:18:04 +0000 (15:18 +0300)] 
mdbox: Fix want_altpath flags/boolean mixup

There was only a single flag, so this wasn't actually currently broken.

9 years agoauth: Fixed error handling in passdb/userdb dict config parsing
Timo Sirainen [Sun, 5 Jun 2016 12:11:56 +0000 (15:11 +0300)] 
auth: Fixed error handling in passdb/userdb dict config parsing

9 years agodirector: Fixed ignoring an obsolete up/down change while host is desynced.
Timo Sirainen [Sun, 5 Jun 2016 11:54:05 +0000 (14:54 +0300)] 
director: Fixed ignoring an obsolete up/down change while host is desynced.

9 years agolib-dcrypt: Fixed function return type.
Timo Sirainen [Sun, 5 Jun 2016 01:29:00 +0000 (04:29 +0300)] 
lib-dcrypt: Fixed function return type.

9 years agolazy-expunge: Fixed crash on error handling
Timo Sirainen [Sat, 4 Jun 2016 00:47:37 +0000 (03:47 +0300)] 
lazy-expunge: Fixed crash on error handling

9 years agolib-index: Fix duplicate fields in mail_cache_register_fields()
Timo Sirainen [Fri, 3 Jun 2016 17:14:01 +0000 (20:14 +0300)] 
lib-index: Fix duplicate fields in mail_cache_register_fields()

Broken by hash_table_insert() API change. The earlier code was also a bit
wrong by allocating a bit too much memory when there were duplicate fields
being registered.

9 years agolib-index: Fixed extension resizing
Timo Sirainen [Fri, 3 Jun 2016 17:10:02 +0000 (20:10 +0300)] 
lib-index: Fixed extension resizing

Broken by 8483af4ff.

9 years agolib-index: Added header-size asserts
Timo Sirainen [Fri, 3 Jun 2016 17:00:14 +0000 (20:00 +0300)] 
lib-index: Added header-size asserts

9 years agolib-index: Fixed fsck handling extension with invalid header size
Timo Sirainen [Fri, 3 Jun 2016 16:58:29 +0000 (19:58 +0300)] 
lib-index: Fixed fsck handling extension with invalid header size

Fixes:

Panic: file mail-index-sync-ext.c: line 393 (mail_index_sync_ext_init_new): assertion failed: (hdr_buf->used == map->hdr.header_size)

9 years agoglobal: Use hash_table_update() instead of _insert() where necessary.
Timo Sirainen [Fri, 3 Jun 2016 16:31:09 +0000 (19:31 +0300)] 
global: Use hash_table_update() instead of _insert() where necessary.

9 years agolib-storage: Detect duplicate mailbox GUIDs in guid-cache.
Timo Sirainen [Fri, 3 Jun 2016 16:20:35 +0000 (19:20 +0300)] 
lib-storage: Detect duplicate mailbox GUIDs in guid-cache.

Also fixes assert-crashing in hash_table_insert() when it happens.

9 years agomaildir: Detect duplicate keywords in dovecot-keywords file
Timo Sirainen [Fri, 3 Jun 2016 16:18:43 +0000 (19:18 +0300)] 
maildir: Detect duplicate keywords in dovecot-keywords file

Use the first such keyword's index, not the last.

Also fixes assert-crashing in hash_table_insert() when it happens.

9 years agomaildir: Avoid extra memory usage on duplicate uidlist entries
Timo Sirainen [Fri, 3 Jun 2016 16:17:03 +0000 (19:17 +0300)] 
maildir: Avoid extra memory usage on duplicate uidlist entries

Also fixes assert-crashing in hash_table_insert() when it happens.

9 years agolib-index: Allow growing ext record_size after mail_index_update_ext()
Timo Sirainen [Fri, 3 Jun 2016 14:54:36 +0000 (17:54 +0300)] 
lib-index: Allow growing ext record_size after mail_index_update_ext()

The existing records will just get some zero-padding at the end of records.

9 years agolib-index: Fixed changing extension record sizes.
Timo Sirainen [Fri, 3 Jun 2016 14:52:39 +0000 (17:52 +0300)] 
lib-index: Fixed changing extension record sizes.

map needs to be cloned before any extension record size changes are done.
Otherwise the map cloning will crash or do something broken.

9 years agolib-index: Minor code cleanup - use better variable names
Timo Sirainen [Fri, 3 Jun 2016 14:40:11 +0000 (17:40 +0300)] 
lib-index: Minor code cleanup - use better variable names

9 years agolib-storage: add no_fts in struct mail_search_arg
Baofeng Wang [Wed, 18 May 2016 11:42:21 +0000 (14:42 +0300)] 
lib-storage: add no_fts in struct mail_search_arg

When flag is set, FTS will not be performed.

fts plugin: handle no_fts flag

No fts will be performed once flag is set.
Original patch from Timo Sirainen <timo.sirainen@dovecot.fi>

9 years agohash: refactor hash_table_insert_node() and its callers reference
Baofeng Wang [Tue, 17 May 2016 08:45:50 +0000 (11:45 +0300)] 
hash: refactor hash_table_insert_node() and its callers reference

Refactor *changes* the behavior of hash_table_insert().
* hash_table_insert() will assert when a key already exsists.
And hash_table_update() remains updating value when a key already exsists.

Refactor also changes the argument list referred by all its callers:
* hash_table_insert/update/resize().

9 years agolib-fts: fixup misuse of hash_table_insert()
Baofeng Wang [Tue, 17 May 2016 08:42:30 +0000 (11:42 +0300)] 
lib-fts: fixup misuse of hash_table_insert()

Instead use hash_table_update() to replace value when a key exsists.

9 years agovirtual: Moved virtual_mailbox_vfuncs to lib-storage.
Timo Sirainen [Mon, 30 May 2016 16:07:16 +0000 (19:07 +0300)] 
virtual: Moved virtual_mailbox_vfuncs to lib-storage.

This allows implementing other virtual storage backends.

9 years agomaster: Give a nicer error if unix/fifo_listener path is empty.
Timo Sirainen [Wed, 1 Jun 2016 09:37:22 +0000 (12:37 +0300)] 
master: Give a nicer error if unix/fifo_listener path is empty.

The previous error was simply:

unlink(/var/run/dovecot/) failed: Is a directory

9 years agoprint CFLAGS on ./configure
Martti Rannanjärvi [Thu, 2 Jun 2016 12:11:21 +0000 (15:11 +0300)] 
print CFLAGS on ./configure

9 years agolib: net_get_ip_any[46]() to struct net_ip[46]_any
Martti Rannanjärvi [Mon, 9 May 2016 12:24:28 +0000 (15:24 +0300)] 
lib: net_get_ip_any[46]() to struct net_ip[46]_any

Also add struct net_ip[46]_loopback.

9 years agolib: remove useless NULL check after calling vstrconcat
Baofeng Wang [Mon, 9 May 2016 11:04:47 +0000 (14:04 +0300)] 
lib: remove useless NULL check after calling vstrconcat

behavior change accordingly.

9 years agoliblib: *_strndup() and *_strconcat() shouldn't pass through NULLs.
Baofeng Wang [Wed, 20 Apr 2016 14:28:24 +0000 (17:28 +0300)] 
liblib: *_strndup() and *_strconcat() shouldn't pass through NULLs.

Assert NULL string pointer in below functions:
i_strndup(), t_strndup() and p_strconcat(), t_strconcat(), i_strconcat() and
vstrconcat.
Replace former NULL condition check accordingly.

9 years agolib-fs: do NOT feed i_strconcat() with NULL
Baofeng Wang [Thu, 28 Apr 2016 08:47:59 +0000 (11:47 +0300)] 
lib-fs: do NOT feed i_strconcat() with NULL

fill the string with valid content beforehand.

9 years agostorage: do NOT feed p_strconcat() with NULL.
Baofeng [Tue, 12 Apr 2016 10:08:05 +0000 (13:08 +0300)] 
storage: do NOT feed p_strconcat() with NULL.

p_strconcat will never take NULL as an valid argument.
So ns->list->set.alt_dir has to be checked NULL.

9 years agoauth: do NOT feed p_strconcat() with NULL
Baofeng [Mon, 11 Apr 2016 18:20:48 +0000 (21:20 +0300)] 
auth: do NOT feed p_strconcat() with NULL

p_strconcat will never take NULL as an valid argument.
Check possible NULL string before calling it.

9 years agolib-fts: Improved stopword file reading.
Teemu Huovila [Wed, 1 Jun 2016 09:24:57 +0000 (12:24 +0300)] 
lib-fts: Improved stopword file reading.

The reading tries to be a little bit stricter now. Only stopwords at the
start of a new line are accepted now. Changed fi stopwords accordingly.
Also removed superfluous stack allocation in parsing.

9 years agolib-fts: Add stopword files for more languages.
Teemu Huovila [Mon, 30 May 2016 09:40:00 +0000 (12:40 +0300)] 
lib-fts: Add stopword files for more languages.

9 years agolib-fts: Move stopwords to subdirectory.
Teemu Huovila [Mon, 30 May 2016 08:54:26 +0000 (11:54 +0300)] 
lib-fts: Move stopwords to subdirectory.

All files incluided in dist are explicitly mentioned. The whole
subdirectory 'stopwords' could also be distributed, but that is
more error prone.