]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
8 years agoMakefile: Another fix for make distcheck when using scan-build release-2.2.29
Timo Sirainen [Wed, 12 Apr 2017 09:24:05 +0000 (12:24 +0300)] 
Makefile: Another fix for make distcheck when using scan-build

It seems to run two configures with different parameters, which results in
some of the files not being cleaned up. So this hopefully fixes:

ERROR: files left in build directory after distclean:
./src/util/tcpwrap

8 years agolib-imap: imap-bodystructure: Fixed handling of a multipart part without children...
Stephan Bosch [Tue, 11 Apr 2017 07:34:11 +0000 (09:34 +0200)] 
lib-imap: imap-bodystructure: Fixed handling of a multipart part without children in imap_bodystructure_parse().

In imap_bodystructure_write(), an empty multipart part is addressed by generating an empty text/plain part.
However, when parsing that back with imap_bodystructure_parse() against a parsed message_part tree, this case needs to be considered explicitly.
Otherwise, it will not be able to match the message part hierarchies.

This adds a test suite item that tests both the write (previous commit) and parse functions.

8 years agolib-imap: imap-bodystructure: Fixed handling of a multipart part without children...
Stephan Bosch [Wed, 12 Apr 2017 08:13:15 +0000 (10:13 +0200)] 
lib-imap: imap-bodystructure: Fixed handling of a multipart part without children in imap_bodystructure_write().

In that case it writes an empty text/plain part to prevent generating an invalid BODYSTRUCURE.
However, it always generated the basic BODY version without the extra fields for a full BODYSTRUCTURE.

8 years agoauth: Fix compile problem with vpopmail
Aki Tuomi [Tue, 11 Apr 2017 17:32:19 +0000 (20:32 +0300)] 
auth: Fix compile problem with vpopmail

79fe1b28df44ba22b230326bee895583c1df5a28 forgot to remove const from table.

8 years agoMakefile: Fix make distcheck when using scan-build
Timo Sirainen [Tue, 11 Apr 2017 11:55:04 +0000 (14:55 +0300)] 
Makefile: Fix make distcheck when using scan-build

The _build directory shouldn't be deleted afterwards or it'll just fail.

8 years agolib-dict-sql: Try merge sets to single update
Aki Tuomi [Wed, 11 Jan 2017 17:43:30 +0000 (19:43 +0200)] 
lib-dict-sql: Try merge sets to single update

This attempts to put mergeable keys into same
update instead of using multiple SQL statements.

8 years agolib, userdb-vpopmail: Fully remove var_expand_table_build()
Timo Sirainen [Tue, 11 Apr 2017 07:11:00 +0000 (10:11 +0300)] 
lib, userdb-vpopmail: Fully remove var_expand_table_build()

It was accidentally removed in master-2.2 as part of the changes in
122014ad84488d6309dc7d1572dfc988fedc18c4

This finishes up the removal as it was done in master in
79fe1b28df44ba22b230326bee895583c1df5a28

8 years agolib-imap-client: Fix reconnection
Timo Sirainen [Mon, 10 Apr 2017 14:07:28 +0000 (17:07 +0300)] 
lib-imap-client: Fix reconnection

There was already code for reconnection. We just shouldn't have gone very
far in imapc_connection_connect() if we were still waiting for reconnection
delay to pass.

8 years agoReleased v2.2.29. 2.2.29
Timo Sirainen [Mon, 10 Apr 2017 18:40:16 +0000 (21:40 +0300)] 
Released v2.2.29.

8 years agolib-imap-client: Fixes to unit test
Timo Sirainen [Mon, 10 Apr 2017 15:12:47 +0000 (18:12 +0300)] 
lib-imap-client: Fixes to unit test

8 years agolib-imap-client: Add unit test
Timo Sirainen [Mon, 10 Apr 2017 14:10:21 +0000 (17:10 +0300)] 
lib-imap-client: Add unit test

Initially this tests some connection and reconnection problems.

8 years agolib-imap-client: Include "ms" in reconnect warning message
Timo Sirainen [Mon, 10 Apr 2017 14:09:29 +0000 (17:09 +0300)] 
lib-imap-client: Include "ms" in reconnect warning message

8 years agolib-imap-client: Remove hardcoded IMAPC_CONNECT_RETRY_WAIT_MSECS
Timo Sirainen [Mon, 10 Apr 2017 14:06:34 +0000 (17:06 +0300)] 
lib-imap-client: Remove hardcoded IMAPC_CONNECT_RETRY_WAIT_MSECS

We have a setting for it now.

8 years agolib-imap-client: Disconnection during LOGIN should still have state=disconnected
Timo Sirainen [Mon, 10 Apr 2017 13:44:52 +0000 (16:44 +0300)] 
lib-imap-client: Disconnection during LOGIN should still have state=disconnected

It's not an authentication failure, which would imply that the user or
password was wrong.

8 years agolib-imap-client: Make command tag counter externally accessible
Timo Sirainen [Mon, 10 Apr 2017 13:18:46 +0000 (16:18 +0300)] 
lib-imap-client: Make command tag counter externally accessible

This allows unit tests to reset it.

8 years agolib-imap-client: Call the public login callback exactly once.
Timo Sirainen [Mon, 10 Apr 2017 12:49:24 +0000 (15:49 +0300)] 
lib-imap-client: Call the public login callback exactly once.

Previously it was also called only once, as long as there were only a single
imap connection. (The current imapc code wouldn't create more than one
connection.) It was a bit confusing what the expectation was, so now the
callback is never called more than once.

8 years agolib-imap-client: imapc_client_deinit() didn't set client=NULL
Timo Sirainen [Mon, 10 Apr 2017 11:14:40 +0000 (14:14 +0300)] 
lib-imap-client: imapc_client_deinit() didn't set client=NULL

8 years agoimapc: Change imapc_connection_retry_interval default to be 1 second.
Timo Sirainen [Mon, 10 Apr 2017 10:50:40 +0000 (13:50 +0300)] 
imapc: Change imapc_connection_retry_interval default to be 1 second.

10 secs at least is too high. Usually the connection problem is very
intermittent and even an immediate reconnection would succeed.

8 years agolib-imap-client: Change connect_retry_interval_secs to _msecs
Timo Sirainen [Mon, 10 Apr 2017 10:48:23 +0000 (13:48 +0300)] 
lib-imap-client: Change connect_retry_interval_secs to _msecs

This allows caller to provide better precision.

8 years agolib-imap-client: Use struct timeval for tracking last_connect time.
Timo Sirainen [Mon, 10 Apr 2017 10:46:03 +0000 (13:46 +0300)] 
lib-imap-client: Use struct timeval for tracking last_connect time.

This provides better accuracy when calculating how much time there's left
until reconnection.

8 years agolib-http: Improve request stats text.
Timo Sirainen [Mon, 10 Apr 2017 10:02:17 +0000 (13:02 +0300)] 
lib-http: Improve request stats text.

It's important to know how long the request was in queue before it was sent.

Also the "n attempts in m secs" makes more sense if it was counting only the
time after the initial request was sent, not including the queuing time.

If there is more than 1 attempt, log separately how long all the attempts
were waited on vs. how long the last attempt took.

8 years agolib-http: Add http_client_request_stats.first_sent_msecs
Timo Sirainen [Mon, 10 Apr 2017 09:59:08 +0000 (12:59 +0300)] 
lib-http: Add http_client_request_stats.first_sent_msecs

Also rename sent_msecs to last_sent_msecs.

8 years agolib-http: Track request's first and last send attempt times separately.
Timo Sirainen [Mon, 10 Apr 2017 09:53:43 +0000 (12:53 +0300)] 
lib-http: Track request's first and last send attempt times separately.

8 years agoexample-config: Add blocking setting to dovecot-ldap.conf.ext
Timo Sirainen [Wed, 5 Apr 2017 11:14:57 +0000 (14:14 +0300)] 
example-config: Add blocking setting to dovecot-ldap.conf.ext

8 years agoauth-var-expand-crypt plugin: Add missing ldflags
Timo Sirainen [Sat, 8 Apr 2017 06:58:57 +0000 (09:58 +0300)] 
auth-var-expand-crypt plugin: Add missing ldflags

8 years agofts-solr: Don't double-escape headers.
Timo Sirainen [Sun, 9 Apr 2017 12:48:59 +0000 (15:48 +0300)] 
fts-solr: Don't double-escape headers.

8 years agoauth: Fix crash in passdb imap on connection failures
Timo Sirainen [Fri, 7 Apr 2017 13:27:12 +0000 (16:27 +0300)] 
auth: Fix crash in passdb imap on connection failures

8 years agolib-ssl-iostream: Don't require SSL CA certs if require_valid_cert==FALSE
Timo Sirainen [Fri, 7 Apr 2017 13:13:13 +0000 (16:13 +0300)] 
lib-ssl-iostream: Don't require SSL CA certs if require_valid_cert==FALSE

This happened only when verify_remote_cert was also TRUE. But this behavior
now allows verifying the cert without actually requiring it to be valid.

8 years agoauth: passdb imap: Use ssl_client_ca_* settings.
Timo Sirainen [Fri, 7 Apr 2017 12:47:27 +0000 (15:47 +0300)] 
auth: passdb imap: Use ssl_client_ca_* settings.

The args = ssl_ca_dir=.. setting still overrides the ssl_client_ca_dir.

8 years agoglobal: Remove extra ';' to fix compiler errors
Timo Sirainen [Fri, 7 Apr 2017 06:34:39 +0000 (09:34 +0300)] 
global: Remove extra ';' to fix compiler errors

Sun C doesn't like them.

8 years agoglobal: Make sure all files end with newline
Timo Sirainen [Fri, 7 Apr 2017 06:32:30 +0000 (09:32 +0300)] 
global: Make sure all files end with newline

Fixes compiler warnings with Sun C.

8 years agofs-posix: Fix FS_METADATA_WRITE_FNAME to preserve the path
Timo Sirainen [Fri, 7 Apr 2017 07:55:40 +0000 (10:55 +0300)] 
fs-posix: Fix FS_METADATA_WRITE_FNAME to preserve the path

It should only change the filename.

8 years agodoveadm force-resync: Skip autocreated mailboxes that don't exist yet.
Timo Sirainen [Fri, 7 Apr 2017 09:45:49 +0000 (12:45 +0300)] 
doveadm force-resync: Skip autocreated mailboxes that don't exist yet.

Since they don't exist, there's nothing to resync in them either.
This avoids unnecessarily creating them.

8 years agodict-sql: Fix setting $variables to iteration key when map had multiple values
Timo Sirainen [Fri, 7 Apr 2017 09:42:12 +0000 (12:42 +0300)] 
dict-sql: Fix setting $variables to iteration key when map had multiple values

8 years agoexample-config: Add connect/read/write_timeout to mysql connect settings
Timo Sirainen [Thu, 6 Apr 2017 17:43:20 +0000 (20:43 +0300)] 
example-config: Add connect/read/write_timeout to mysql connect settings

8 years agoReleased v2.2.29.rc1. 2.2.29.rc1
Timo Sirainen [Thu, 6 Apr 2017 17:24:17 +0000 (20:24 +0300)] 
Released v2.2.29.rc1.

8 years agoimapc: Remove "_sec" suffix from imapc_connection_retry_interval_secs
Timo Sirainen [Thu, 6 Apr 2017 17:00:31 +0000 (20:00 +0300)] 
imapc: Remove "_sec" suffix from imapc_connection_retry_interval_secs

Its type is SET_TIME, so the value doesn't have to be in seconds.

8 years agoimap-login: Retain client ID only when enabled
Aki Tuomi [Thu, 6 Apr 2017 16:49:07 +0000 (19:49 +0300)] 
imap-login: Retain client ID only when enabled

8 years agolib-storage: Set internal error in imapc_list_get_hierarchy_sep
Aki Tuomi [Wed, 5 Apr 2017 11:23:47 +0000 (14:23 +0300)] 
lib-storage: Set internal error in imapc_list_get_hierarchy_sep

8 years agoimapc: Use IMAPC_COMMAND_STATE_AUTH_FAILED to indicate auth failure
Aki Tuomi [Wed, 5 Apr 2017 11:23:26 +0000 (14:23 +0300)] 
imapc: Use IMAPC_COMMAND_STATE_AUTH_FAILED to indicate auth failure

8 years agolib-imap-client: Do not reset ips when reconnecting
Aki Tuomi [Wed, 5 Apr 2017 11:22:38 +0000 (14:22 +0300)] 
lib-imap-client: Do not reset ips when reconnecting

Avoids infinite loop

8 years agolib-storage: Return empty value in imapc_list_get_storage_name on auth error
Aki Tuomi [Wed, 5 Apr 2017 10:27:57 +0000 (13:27 +0300)] 
lib-storage: Return empty value in imapc_list_get_storage_name on auth error

Avoids clobbering authentication error.

8 years agolib-storage: Do not clobber error with imapc
Aki Tuomi [Wed, 5 Apr 2017 09:48:31 +0000 (12:48 +0300)] 
lib-storage: Do not clobber error with imapc

8 years agoglobal: Fix imapc_client_login usage
Aki Tuomi [Wed, 5 Apr 2017 09:47:24 +0000 (12:47 +0300)] 
global: Fix imapc_client_login usage

8 years agolib-imap-client: Add login_callback setter
Aki Tuomi [Wed, 5 Apr 2017 09:09:57 +0000 (12:09 +0300)] 
lib-imap-client: Add login_callback setter

This way it can be set before actually calling login
which might happen some time later.

8 years agoimapc: Fix memory leak in disconnected state
Dmitry Yakunin [Tue, 4 Apr 2017 20:33:51 +0000 (23:33 +0300)] 
imapc: Fix memory leak in disconnected state

8 years agoauth: Update default policy string to include device id and protocol
Aki Tuomi [Wed, 5 Apr 2017 06:26:54 +0000 (09:26 +0300)] 
auth: Update default policy string to include device id and protocol

8 years agoimap: Set command reason strings using the new human_args
Timo Sirainen [Tue, 4 Apr 2017 12:59:04 +0000 (15:59 +0300)] 
imap: Set command reason strings using the new human_args

This way the reason string is already suitable for logging, since it's
guaranteed to be valid UTF-8 without control chars.

8 years agoimap: Add client_command_context.human_args
Timo Sirainen [Tue, 4 Apr 2017 12:58:42 +0000 (15:58 +0300)] 
imap: Add client_command_context.human_args

Generated with imap_write_args_for_human()

8 years agolib-imap: Add imap_write_args_for_human()
Timo Sirainen [Tue, 4 Apr 2017 12:58:15 +0000 (15:58 +0300)] 
lib-imap: Add imap_write_args_for_human()

8 years agoimap: Add imap_client_command_get_reason()
Timo Sirainen [Tue, 4 Apr 2017 12:38:00 +0000 (15:38 +0300)] 
imap: Add imap_client_command_get_reason()

All the command -> reason string conversions now go through this function.

8 years agolib: Increase net_connect*() EADDRNOTAVAIL retries to 20
Timo Sirainen [Tue, 4 Apr 2017 10:28:44 +0000 (13:28 +0300)] 
lib: Increase net_connect*() EADDRNOTAVAIL retries to 20

4 is too little, since on busy systems it's sometimes failing. These calls
should be pretty cheap, so lets try if 20 is enough.

It would be nice if this was configurable, but the only practical way right
now would be to use environment variable, which is a bit ugly. We could
try it next if 20 is still not enough.

8 years agoimapc: Compiler warning fix for 32bit systems
Timo Sirainen [Mon, 3 Apr 2017 15:44:52 +0000 (18:44 +0300)] 
imapc: Compiler warning fix for 32bit systems

8 years agolib-imap-client: Make authentication failures more consistent
Aki Tuomi [Fri, 31 Mar 2017 07:57:14 +0000 (10:57 +0300)] 
lib-imap-client: Make authentication failures more consistent

This way they always say the same prefix, which is easier to
spot.

8 years agolib-imap-client: Call login_callback on all authentication failures
Aki Tuomi [Fri, 31 Mar 2017 07:49:50 +0000 (10:49 +0300)] 
lib-imap-client: Call login_callback on all authentication failures

8 years agolib-imap-client: Fix reconnection
Aki Tuomi [Fri, 31 Mar 2017 07:12:58 +0000 (10:12 +0300)] 
lib-imap-client: Fix reconnection

This patch fixes reconnections to actually consider
all IP addresses first and then delay for interval and
retry at most retry count times.

8 years agolib-imap-client: Remove io earlier to avoid hammering
Aki Tuomi [Fri, 31 Mar 2017 08:01:15 +0000 (11:01 +0300)] 
lib-imap-client: Remove io earlier to avoid hammering

If connection has failed and reconnection is not yet
possible, io has to be removed here, otherwise it will
keep hammering the callback.

8 years agolib-imap-client: Only LOGOUT from connected connections
Aki Tuomi [Fri, 31 Mar 2017 07:58:47 +0000 (10:58 +0300)] 
lib-imap-client: Only LOGOUT from connected connections

8 years agolib-imap-client: Make retry count and interval configurable
Aki Tuomi [Fri, 31 Mar 2017 06:44:28 +0000 (09:44 +0300)] 
lib-imap-client: Make retry count and interval configurable

8 years agolib-imap-client: Add imapc_client_try_stop
Aki Tuomi [Fri, 31 Mar 2017 06:59:02 +0000 (09:59 +0300)] 
lib-imap-client: Add imapc_client_try_stop

8 years agolib-sasl: Add missing input handler for xoauth2
Aki Tuomi [Thu, 30 Mar 2017 13:09:06 +0000 (16:09 +0300)] 
lib-sasl: Add missing input handler for xoauth2

8 years agodirector: Fix mail_hosts_dup() to duplicate tags correctly.
Timo Sirainen [Mon, 3 Apr 2017 09:40:51 +0000 (12:40 +0300)] 
director: Fix mail_hosts_dup() to duplicate tags correctly.

The host->tag pointed to the old hosts list. Also the new hosts list's tags
array wasn't filled.

This fixes USER-LOOKUP to return host with default configuration, which fixes
doveadm director status <user> to not show "Initial config" as empty.

8 years agodoveadm: Call mailbox_set_reason with initialized mailbox
Martti Rannanjärvi [Mon, 3 Apr 2017 08:41:29 +0000 (11:41 +0300)] 
doveadm: Call mailbox_set_reason with initialized mailbox

8 years agoglobal: Add mailbox_transaction_set_reason() calls
Timo Sirainen [Sat, 1 Apr 2017 19:12:37 +0000 (22:12 +0300)] 
global: Add mailbox_transaction_set_reason() calls

Added to the most important places.

8 years agolib-storage: Add mailbox_transaction_set_reason()
Timo Sirainen [Sat, 1 Apr 2017 18:54:30 +0000 (21:54 +0300)] 
lib-storage: Add mailbox_transaction_set_reason()

8 years agoglobal: Add mailbox_set_reason() calls
Timo Sirainen [Sat, 1 Apr 2017 18:43:16 +0000 (21:43 +0300)] 
global: Add mailbox_set_reason() calls

Added to the most important places.

8 years agolib-storage: Add mailbox_set_reason()
Timo Sirainen [Sat, 1 Apr 2017 18:16:37 +0000 (21:16 +0300)] 
lib-storage: Add mailbox_set_reason()

Use it to log a debug message when mailbox is being opened.

8 years agolib-index: Don't increase modseq for backend/dirty flag changes
Timo Sirainen [Mon, 27 Mar 2017 15:05:29 +0000 (18:05 +0300)] 
lib-index: Don't increase modseq for backend/dirty flag changes

These flags are used only for internal changes and they shouldn't be
triggering any modseq changes.

To avoid modseqs from unexpectedly shrinking, the new modseq counting
behavior is enabled only for newly rotated transaction log files that have
a new minor_version.

8 years agolib-index: Add macros to check if transaction log file version is new enough.
Timo Sirainen [Thu, 30 Mar 2017 17:38:44 +0000 (20:38 +0300)] 
lib-index: Add macros to check if transaction log file version is new enough.

The version numbers are 8bit, so we can generate a single 16bit number out
of them.

8 years agolib-http: client: Implemented means to obtain request statistics.
Stephan Bosch [Tue, 28 Mar 2017 23:25:21 +0000 (01:25 +0200)] 
lib-http: client: Implemented means to obtain request statistics.

8 years agolib: Fix strcasecmp mistake in var-expand
Aki Tuomi [Fri, 31 Mar 2017 20:12:47 +0000 (23:12 +0300)] 
lib: Fix strcasecmp mistake in var-expand

8 years agolmtp: Die at startup if config reading fails.
Timo Sirainen [Fri, 31 Mar 2017 13:42:55 +0000 (16:42 +0300)] 
lmtp: Die at startup if config reading fails.

Although most of the time it's not strictly required for config to be read here,
one exception is SSL server settings. If this config reading fails, the SSL
initialization just crashes. So this gives a better error message than a crash.
Also config reading really isn't supposed to fail anyway.

8 years agolib-index: Assert in mail_index_append_finish_uids() to prevent UID wrapping
Timo Sirainen [Thu, 30 Mar 2017 20:25:40 +0000 (23:25 +0300)] 
lib-index: Assert in mail_index_append_finish_uids() to prevent UID wrapping

This should be handled better eventually, but it's better to crash earlier
now than later. This avoids a later assert:

Panic: file mail-index-transaction-finish.c: line 187 (mail_index_transaction_get_uid): assertion failed: (rec->uid != 0)

8 years agolib-fs: Add FS_METADATA_ORIG_PATH
Timo Sirainen [Fri, 31 Mar 2017 09:28:56 +0000 (12:28 +0300)] 
lib-fs: Add FS_METADATA_ORIG_PATH

This allows fs backends to keep track of the original filename and use it
for logging purposes and such.

8 years agolib-fs: Allow fs_set_metadata() to update already added metadata.
Timo Sirainen [Fri, 31 Mar 2017 09:28:01 +0000 (12:28 +0300)] 
lib-fs: Allow fs_set_metadata() to update already added metadata.

Previously we were just appending the metadata multiple times with different
values, which could have caused problems.

8 years agoimap: Fix assert-crash when hibernation triggers during IDLE syncing
Timo Sirainen [Thu, 30 Mar 2017 22:02:49 +0000 (01:02 +0300)] 
imap: Fix assert-crash when hibernation triggers during IDLE syncing

Fixes:
Panic: file cmd-idle.c: line 182 (idle_hibernate_timeout): assertion failed: (ctx->sync_ctx == NULL)

8 years agovar-expand-crypt: Fix data decryption
Aki Tuomi [Mon, 27 Mar 2017 08:02:31 +0000 (11:02 +0300)] 
var-expand-crypt: Fix data decryption

8 years agovar-expand-crypt: Add error handling for initialization
Aki Tuomi [Mon, 27 Mar 2017 06:39:03 +0000 (09:39 +0300)] 
var-expand-crypt: Add error handling for initialization

8 years agovar-expand-crypt: Do not free dcrypt context twice
Aki Tuomi [Mon, 27 Mar 2017 06:34:50 +0000 (09:34 +0300)] 
var-expand-crypt: Do not free dcrypt context twice

Found by coverity

8 years agotest-var-expand: Expect error
Aki Tuomi [Fri, 31 Mar 2017 12:30:58 +0000 (15:30 +0300)] 
test-var-expand: Expect error

8 years agovar-expand-crypt: Remove pointless assigment
Aki Tuomi [Thu, 23 Mar 2017 13:17:44 +0000 (15:17 +0200)] 
var-expand-crypt: Remove pointless assigment

It's never used

8 years agovar-expand-crypt: Fix base64 encoding
Aki Tuomi [Thu, 23 Mar 2017 13:12:45 +0000 (15:12 +0200)] 
var-expand-crypt: Fix base64 encoding

the break was missing, also removed confusing block.

8 years agovar-expand-crypt: Encryption/decryption support for var-expand
Aki Tuomi [Fri, 18 Nov 2016 12:47:05 +0000 (14:47 +0200)] 
var-expand-crypt: Encryption/decryption support for var-expand

Registers new encrypt and decrypt processors for
var-expand.

8 years agolib: Add tests for extensions
Aki Tuomi [Sun, 25 Dec 2016 08:36:59 +0000 (10:36 +0200)] 
lib: Add tests for extensions

8 years agolib: Add extension support for var-expand
Aki Tuomi [Fri, 18 Nov 2016 07:39:46 +0000 (09:39 +0200)] 
lib: Add extension support for var-expand

This enables loading new var-expand features
using plugins.

8 years agolib: Use error_r in var_expand_long and friends
Aki Tuomi [Mon, 27 Mar 2017 10:55:28 +0000 (13:55 +0300)] 
lib: Use error_r in var_expand_long and friends

This is aligment commit for extensions, and differs
from v2.3 so that error is reported in var_expand_with_funcs
since the public API is not changed.

8 years agolib-http: http_client_request_delay_from_response() should use per-request timeout...
Timo Sirainen [Thu, 30 Mar 2017 20:46:02 +0000 (23:46 +0300)] 
lib-http: http_client_request_delay_from_response() should use per-request timeout as max

It was using the global request_timeout_msecs for the maximum timeout,
which could be different from the per-request timeout set by
http_client_request_set_attempt_timeout_msecs().

8 years agolib-http: client: Fixed request-specific attempt timeout.
Stephan Bosch [Thu, 30 Mar 2017 20:29:13 +0000 (22:29 +0200)] 
lib-http: client: Fixed request-specific attempt timeout.

This is the timeout applied to a single request attempt. Using http_client_request_set_attempt_timeout_msecs() this can be set for a specific request.
However, this was mostly ignored for requests that weren't in the process of handling response payload.
Instead, the global request_timeout_msecs client setting was used.

Also amended the (currently manual) test suite with tests that demonstated the problem and now verify the fix.

8 years agolib-index: Use time_to_local_day_start() instead of reimplementing
Timo Sirainen [Tue, 28 Mar 2017 16:40:27 +0000 (19:40 +0300)] 
lib-index: Use time_to_local_day_start() instead of reimplementing

8 years agolib: Add time_to_local_day_start()
Timo Sirainen [Tue, 28 Mar 2017 16:14:00 +0000 (19:14 +0300)] 
lib: Add time_to_local_day_start()

8 years agolib-index: Code cleanup - expand LOG_WANT_ROTATE() macro
Timo Sirainen [Mon, 27 Mar 2017 14:44:45 +0000 (17:44 +0300)] 
lib-index: Code cleanup - expand LOG_WANT_ROTATE() macro

There was no reason it had to be a macro. Also this fixes off-by-one
error when checking for log_rotate_min_size.

8 years agotest: lib-http: Check write_full return value in test
Aki Tuomi [Fri, 17 Mar 2017 08:28:36 +0000 (10:28 +0200)] 
test: lib-http: Check write_full return value in test

Makes static analyzers happier

8 years agotest: fts-squat: Ignore gettimeofday return value in test
Aki Tuomi [Fri, 17 Mar 2017 08:26:50 +0000 (10:26 +0200)] 
test: fts-squat: Ignore gettimeofday return value in test

Makes static analyzers happier

8 years agotest: lib-index: Ensure conficts_seqs is created in test
Aki Tuomi [Fri, 17 Mar 2017 08:26:06 +0000 (10:26 +0200)] 
test: lib-index: Ensure conficts_seqs is created in test

Makes static analyzers happier

8 years agotest: lib: Ensure item is not null
Aki Tuomi [Fri, 17 Mar 2017 08:25:01 +0000 (10:25 +0200)] 
test: lib: Ensure item is not null

Makes static analyzers happier

8 years agotest: lib-fts: Ignore uni_utf8_get_valid_data return value
Aki Tuomi [Fri, 17 Mar 2017 08:19:17 +0000 (10:19 +0200)] 
test: lib-fts: Ignore uni_utf8_get_valid_data return value

Makes static analyzers happier

8 years agotest: mail-crypt: Check dcrypt_id_key_private_old return value
Aki Tuomi [Fri, 17 Mar 2017 08:17:59 +0000 (10:17 +0200)] 
test: mail-crypt: Check dcrypt_id_key_private_old return value

Makes static analyzers happier

8 years agotest: lib-http: Check o_stream_send return value
Aki Tuomi [Fri, 17 Mar 2017 08:16:11 +0000 (10:16 +0200)] 
test: lib-http: Check o_stream_send return value

Makes static analyzers happier

8 years agotest: lib: Check o_stream_send return value
Aki Tuomi [Fri, 17 Mar 2017 08:13:59 +0000 (10:13 +0200)] 
test: lib: Check o_stream_send return value

Make static analyzers happier

8 years agodriver-cassandra: Add metric for slow queries
Aki Tuomi [Mon, 27 Mar 2017 16:50:53 +0000 (19:50 +0300)] 
driver-cassandra: Add metric for slow queries