]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
8 years agolib: Define i_unreached() to __builtin_unreachable() with STATIC_CHECKER
Timo Sirainen [Fri, 22 Sep 2017 11:10:09 +0000 (14:10 +0300)] 
lib: Define i_unreached() to __builtin_unreachable() with STATIC_CHECKER

This helps clang's alpha.deadcode.UnreachableCode checker.

8 years agoreplication-plugin: Debug-log mailbox transaction reason
Martti Rannanjärvi [Fri, 22 Sep 2017 12:07:25 +0000 (15:07 +0300)] 
replication-plugin: Debug-log mailbox transaction reason

8 years agolib-storage: Add reason to mailbox.transaction_begin()
Martti Rannanjärvi [Wed, 20 Sep 2017 14:15:32 +0000 (17:15 +0300)] 
lib-storage: Add reason to mailbox.transaction_begin()

8 years agolib-storage: Add reason to mailbox_transaction_begin()
Martti Rannanjärvi [Wed, 20 Sep 2017 11:42:00 +0000 (14:42 +0300)] 
lib-storage: Add reason to mailbox_transaction_begin()

Remove mailbox_transaction_set_reason().

8 years agoconfigure: Fix link order: libsmtp depends on libprogram-client
Timo Sirainen [Fri, 22 Sep 2017 10:34:47 +0000 (13:34 +0300)] 
configure: Fix link order: libsmtp depends on libprogram-client

8 years agolib-storage: Don't crash when opening inbox fails in mailbox-list-index-notify
Martti Rannanjärvi [Thu, 21 Sep 2017 18:49:09 +0000 (21:49 +0300)] 
lib-storage: Don't crash when opening inbox fails in mailbox-list-index-notify

8 years agolib-sql: Fix compiler warning with OSX
Timo Sirainen [Thu, 21 Sep 2017 12:53:40 +0000 (15:53 +0300)] 
lib-sql: Fix compiler warning with OSX

8 years agomaster: Don't throttle services that are already being destroyed
Timo Sirainen [Thu, 21 Sep 2017 14:53:04 +0000 (17:53 +0300)] 
master: Don't throttle services that are already being destroyed

If process couldn't be created, because the service_list is already being
destroyed (e.g. due to reload), also don't enable unnecessary throttling
for the service.

Hopefully fixes these random errors that are logged alone:
master: Error: service(...): command startup failed, throttling for 2 secs

8 years agolib: If log writing to log process is blocking, show it in process title
Timo Sirainen [Tue, 19 Sep 2017 10:52:30 +0000 (13:52 +0300)] 
lib: If log writing to log process is blocking, show it in process title

This change also makes the log pipe non-blocking.

8 years agolib: Add process_title_get()
Timo Sirainen [Tue, 19 Sep 2017 10:49:03 +0000 (13:49 +0300)] 
lib: Add process_title_get()

8 years agoAdd <%{pid}> to default mail_log_prefix
Timo Sirainen [Wed, 20 Sep 2017 16:09:58 +0000 (19:09 +0300)] 
Add <%{pid}> to default mail_log_prefix

It's especially useful nowadays when the same session ID can be reused by
multiple processes with IMAP hibernation enabled.

8 years agodoveadm: "Extraneous arguments found": Show the args in the error
Timo Sirainen [Wed, 20 Sep 2017 12:56:10 +0000 (15:56 +0300)] 
doveadm: "Extraneous arguments found": Show the args in the error

8 years agolib-http: client: Send empty payload (Content-Length: 0) for requests that normally...
Stephan Bosch [Wed, 20 Sep 2017 22:38:33 +0000 (00:38 +0200)] 
lib-http: client: Send empty payload (Content-Length: 0) for requests that normally expect a payload.

This includes the standard POST and PUT methods.
Others need to use the new http_client_request_set_payload_empty() function to force sending an empty payload.

8 years agonotify-status plugin: Use priv/status/<mailbox> for keys
Timo Sirainen [Wed, 20 Sep 2017 12:03:55 +0000 (15:03 +0300)] 
notify-status plugin: Use priv/status/<mailbox> for keys

priv/<mailbox>/status can't be used with dict-sql when <mailbox> has '/'.

8 years agoglobal: start relying on buffer_free(NULL) being a no-op
Josef 'Jeff' Sipek [Tue, 19 Sep 2017 10:33:06 +0000 (13:33 +0300)] 
global: start relying on buffer_free(NULL) being a no-op

Cleanup performed with the following semantic patch:

@@
expression E;
@@

- if (E != NULL) {
-  buffer_free(&E);
- }
+ buffer_free(&E);

8 years agolib: buffer_free(NULL) should be a no-op
Josef 'Jeff' Sipek [Tue, 19 Sep 2017 10:26:57 +0000 (13:26 +0300)] 
lib: buffer_free(NULL) should be a no-op

8 years agoglobal: start relying on pool_unref(NULL) being a no-op
Josef 'Jeff' Sipek [Tue, 19 Sep 2017 10:25:23 +0000 (13:25 +0300)] 
global: start relying on pool_unref(NULL) being a no-op

Cleanup performed with the following semantic patch:

@@
expression E;
@@

- if (E != NULL) {
-  pool_unref(&E);
- }
+ pool_unref(&E);

8 years agolib: pool_unref(NULL) shoud be a no-op
Josef 'Jeff' Sipek [Tue, 19 Sep 2017 10:21:07 +0000 (13:21 +0300)] 
lib: pool_unref(NULL) shoud be a no-op

8 years agoglobal: start relying on [io]_stream_unref(NULL) being a no-op
Josef 'Jeff' Sipek [Tue, 19 Sep 2017 10:19:36 +0000 (13:19 +0300)] 
global: start relying on [io]_stream_unref(NULL) being a no-op

Cleanup performed with the following semantic patch:

@@
expression E;
@@

- if (E != NULL) {
-  i_stream_unref(&E);
- }
+ i_stream_unref(&E);

@@
expression E;
@@

- if (E != NULL) {
-  o_stream_unref(&E);
- }
+ o_stream_unref(&E);

8 years agolib: [io]_stream_unref(NULL) should be a no-op
Josef 'Jeff' Sipek [Tue, 19 Sep 2017 10:09:07 +0000 (13:09 +0300)] 
lib: [io]_stream_unref(NULL) should be a no-op

8 years agoglobal: start relying on [io]_stream_destroy(NULL) being a no-op
Josef 'Jeff' Sipek [Tue, 6 Jun 2017 09:53:41 +0000 (12:53 +0300)] 
global: start relying on [io]_stream_destroy(NULL) being a no-op

Cleanup performed with the following semantic patch:

@@
expression E;
@@

- if (E != NULL) {
-  i_stream_destroy(&E);
- }
+ i_stream_destroy(&E);

@@
expression E;
@@

- if (E != NULL) {
-  o_stream_destroy(&E);
- }
+ o_stream_destroy(&E);

8 years agolib: [io]_stream_destroy(NULL) should be a no-op
Josef 'Jeff' Sipek [Tue, 6 Jun 2017 09:49:00 +0000 (12:49 +0300)] 
lib: [io]_stream_destroy(NULL) should be a no-op

8 years agoglobal: start relying on timeout_remove(NULL) being a no-op
Josef 'Jeff' Sipek [Tue, 6 Jun 2017 09:33:23 +0000 (12:33 +0300)] 
global: start relying on timeout_remove(NULL) being a no-op

Cleanup performed with the following semantic patch:

@@
expression E;
@@

- if (E != NULL) {
-  timeout_remove(&E);
- }
+ timeout_remove(&E);

8 years agolib: timeout_remove(NULL) should be a no-op
Josef 'Jeff' Sipek [Tue, 6 Jun 2017 09:30:17 +0000 (12:30 +0300)] 
lib: timeout_remove(NULL) should be a no-op

8 years agoglobal: start relying on io_remove{,_closed}(NULL) being a no-op
Josef 'Jeff' Sipek [Tue, 6 Jun 2017 09:28:07 +0000 (12:28 +0300)] 
global: start relying on io_remove{,_closed}(NULL) being a no-op

Cleanup performed with the following semantic patch:

@@
expression E;
@@

- if (E != NULL) {
-  io_remove(&E);
- }
+ io_remove(&E);

@@
expression E;
@@

- if (E != NULL) {
-  io_remove_closed(&E);
- }
+ io_remove_closed(&E);

8 years agolib: io_remove(NULL) and io_remove_closed(NULL) should be no-ops
Josef 'Jeff' Sipek [Tue, 6 Jun 2017 09:19:22 +0000 (12:19 +0300)] 
lib: io_remove(NULL) and io_remove_closed(NULL) should be no-ops

8 years agoglobal: start relying on i_close_fd(-1) being a no-op
Josef 'Jeff' Sipek [Tue, 6 Jun 2017 07:20:49 +0000 (10:20 +0300)] 
global: start relying on i_close_fd(-1) being a no-op

Cleanup performed with the following semantic patch:

@@
expression E;
@@

- if (E != -1)
-  i_close_fd(&E);
+ i_close_fd(&E);

8 years agolib: i_close_fd(-1) should be a no-op
Josef 'Jeff' Sipek [Tue, 6 Jun 2017 07:13:15 +0000 (10:13 +0300)] 
lib: i_close_fd(-1) should be a no-op

8 years agodirector: Fix flush to kick the user also when all backends are down
Timo Sirainen [Tue, 19 Sep 2017 22:47:38 +0000 (01:47 +0300)] 
director: Fix flush to kick the user also when all backends are down

The user's host can't change, because there are no other hosts. So add a
new parameter to force the kick anyway.

8 years agocassandra: Timestamp should be in microseconds, not milliseconds
Timo Sirainen [Tue, 19 Sep 2017 11:48:54 +0000 (14:48 +0300)] 
cassandra: Timestamp should be in microseconds, not milliseconds

8 years agoglobal: use i_rand_limit() and i_rand_minmax() when possible
Josef 'Jeff' Sipek [Mon, 18 Sep 2017 11:15:44 +0000 (14:15 +0300)] 
global: use i_rand_limit() and i_rand_minmax() when possible

8 years agolib: introduce i_rand_limit() and i_rand_minmax()
Josef 'Jeff' Sipek [Mon, 18 Sep 2017 10:55:08 +0000 (13:55 +0300)] 
lib: introduce i_rand_limit() and i_rand_minmax()

8 years agolib-index: fix off-by-one in index flag update test
Josef 'Jeff' Sipek [Mon, 18 Sep 2017 13:48:41 +0000 (16:48 +0300)] 
lib-index: fix off-by-one in index flag update test

When selecting the second seq, the max value we should generate is
hdr.messages_count - not one less than that.

8 years agolib-storage: Fail if two namespaces try to wrongly share the same LISTINDEX
Timo Sirainen [Tue, 19 Sep 2017 08:18:30 +0000 (11:18 +0300)] 
lib-storage: Fail if two namespaces try to wrongly share the same LISTINDEX

If they have different mailboxes-path, they can't be sharing the same
mailbox list index. The previous behavior caused Dovecot to silently
overwrite the list index whenever each of the namespaces were accessed,
resulting in bad performance.

8 years agonotify-status: Remove first_unseen_seq field
Timo Sirainen [Mon, 18 Sep 2017 20:04:55 +0000 (23:04 +0300)] 
notify-status: Remove first_unseen_seq field

The sequence number keeps changing, so it's very unlikely to be useful.
It's also not always as efficiently available as the other fields, so
better to avoid having it.

8 years agolib-storage: convert struct pop3_mail casts to container_of
Josef 'Jeff' Sipek [Thu, 7 Sep 2017 11:26:51 +0000 (14:26 +0300)] 
lib-storage: convert struct pop3_mail casts to container_of

8 years agolib-storage: convert struct imapc_mail casts to container_of
Josef 'Jeff' Sipek [Thu, 7 Sep 2017 11:11:06 +0000 (14:11 +0300)] 
lib-storage: convert struct imapc_mail casts to container_of

8 years agolib-storage: convert index to use container_of
Josef 'Jeff' Sipek [Thu, 7 Sep 2017 10:04:01 +0000 (13:04 +0300)] 
lib-storage: convert index to use container_of

8 years agolib-storage: convert missed mbox casts to container_of
Josef 'Jeff' Sipek [Thu, 7 Sep 2017 11:29:08 +0000 (14:29 +0300)] 
lib-storage: convert missed mbox casts to container_of

8 years agolib-storage: convert missed raw storage casts to container_of
Josef 'Jeff' Sipek [Thu, 7 Sep 2017 11:28:27 +0000 (14:28 +0300)] 
lib-storage: convert missed raw storage casts to container_of

8 years agolib-storage: convert missed maildir casts to container_of
Josef 'Jeff' Sipek [Thu, 7 Sep 2017 11:24:46 +0000 (14:24 +0300)] 
lib-storage: convert missed maildir casts to container_of

8 years agolib-storage: convert missed imapc casts to container_of
Josef 'Jeff' Sipek [Thu, 7 Sep 2017 11:21:03 +0000 (14:21 +0300)] 
lib-storage: convert missed imapc casts to container_of

8 years agolib-storage: convert missed cydir casts to container_of
Josef 'Jeff' Sipek [Thu, 7 Sep 2017 11:08:44 +0000 (14:08 +0300)] 
lib-storage: convert missed cydir casts to container_of

8 years agoauth: Expand %{ldap_dn} to ldap_get_dn().
Sergey Kitov [Fri, 15 Sep 2017 12:17:08 +0000 (15:17 +0300)] 
auth: Expand %{ldap_dn} to ldap_get_dn().

8 years agodirector: Avoid "ring sync timeout" errors when all backends are down
Timo Sirainen [Thu, 14 Sep 2017 09:50:29 +0000 (12:50 +0300)] 
director: Avoid "ring sync timeout" errors when all backends are down

doveadm commands were failing with it. Also pending request failures were
logged as failing due to ring sync timeout, instead of because no hosts.

8 years agodirector: Delay calling state_change_callback() after user kick is finished
Timo Sirainen [Thu, 14 Sep 2017 10:02:40 +0000 (13:02 +0300)] 
director: Delay calling state_change_callback() after user kick is finished

Otherwise it can get into recursive loop and cause problems.

8 years agodoveadm director: Improve logging unexpected disconnections from director socket
Timo Sirainen [Thu, 14 Sep 2017 09:42:13 +0000 (12:42 +0300)] 
doveadm director: Improve logging unexpected disconnections from director socket

Previously it just logged "failed", which wasn't very understandable.

8 years agodirector: Fix crash when flush is run and all backends are down.
Timo Sirainen [Tue, 22 Aug 2017 13:32:32 +0000 (16:32 +0300)] 
director: Fix crash when flush is run and all backends are down.

Instead of moving the users elsewhere, just kill them and flush the backend.

8 years agolib: uri_parser_init*() - initialize allow_pct_nul
Timo Sirainen [Fri, 15 Sep 2017 08:49:16 +0000 (11:49 +0300)] 
lib: uri_parser_init*() - initialize allow_pct_nul

Unless the caller explicitly cleared the parser's memory, allow_pct_nul was
somewhat random. All the code in Dovecot core did this, but some plugins
didn't.

8 years agodirector: Fix ring sync wait after DIRECTOR-REMOVE
Timo Sirainen [Thu, 14 Sep 2017 15:13:05 +0000 (18:13 +0300)] 
director: Fix ring sync wait after DIRECTOR-REMOVE

It was sending OK twice, and the first OK was too early.

8 years agodirector: Ignore CONNECT requests to hosts that have been removed already
Timo Sirainen [Thu, 14 Sep 2017 14:59:05 +0000 (17:59 +0300)] 
director: Ignore CONNECT requests to hosts that have been removed already

8 years agodirector: After CONNECT was received, make sure we disconnect
Timo Sirainen [Thu, 14 Sep 2017 14:57:29 +0000 (17:57 +0300)] 
director: After CONNECT was received, make sure we disconnect

The remote side won't be reading anything after the CONNECT, so we have to
disconnect anyway. If we decide that the CONNECT request is wrong, reconnect
after a short delay and hope that the remote agrees with us the next time.

8 years agodirector: When director is removed, notify it before disconnecting
Timo Sirainen [Thu, 14 Sep 2017 14:48:50 +0000 (17:48 +0300)] 
director: When director is removed, notify it before disconnecting

This way the removed director will know that it's been removed, and it
can also more quickly forward the removal to other directors.

8 years agodirector: Don't reset directors' last_network_failure while handshaking
Timo Sirainen [Thu, 14 Sep 2017 14:38:24 +0000 (17:38 +0300)] 
director: Don't reset directors' last_network_failure while handshaking

The reset is done mainly to make it faster for a director that has been down
to connect back to the ring, without other directors still thinking that
it's down. But DIRECTOR that is sent during handshake says nothing about
whether the director is up at the moment or not.

8 years agodirector: Log info line for every incoming/outgoing connection
Timo Sirainen [Thu, 14 Sep 2017 14:35:02 +0000 (17:35 +0300)] 
director: Log info line for every incoming/outgoing connection

This can help with debugging problems.

8 years agodirector: Cleanup - move code to a new director_log_connect()
Timo Sirainen [Thu, 14 Sep 2017 14:33:19 +0000 (17:33 +0300)] 
director: Cleanup - move code to a new director_log_connect()

Also adds a missing ')' to the log line.

8 years agodirector: Log info line whenever a director is added/removed from ring
Timo Sirainen [Thu, 14 Sep 2017 14:29:48 +0000 (17:29 +0300)] 
director: Log info line whenever a director is added/removed from ring

This can help with debugging problems.

8 years agodirector: Improve debugging: Log ring desync when there is no right connection
Timo Sirainen [Thu, 14 Sep 2017 15:13:33 +0000 (18:13 +0300)] 
director: Improve debugging: Log ring desync when there is no right connection

8 years agodirector: When logging "ring SYNC lost", include sync seq number in message
Timo Sirainen [Thu, 14 Sep 2017 14:26:39 +0000 (17:26 +0300)] 
director: When logging "ring SYNC lost", include sync seq number in message

This can help with debugging.

8 years agolib: chdir to / after chroot
Aki Tuomi [Thu, 14 Sep 2017 10:34:22 +0000 (13:34 +0300)] 
lib: chdir to / after chroot

Makes static analyzers more happy

8 years agodoveadm director ring remove: Wait ring sync before and after removal
Timo Sirainen [Thu, 14 Sep 2017 08:57:27 +0000 (11:57 +0300)] 
doveadm director ring remove: Wait ring sync before and after removal

This helps mainly with automated tests.

8 years agodirector: Return temporary auth failures using the new "code" field
Timo Sirainen [Thu, 14 Sep 2017 10:19:26 +0000 (13:19 +0300)] 
director: Return temporary auth failures using the new "code" field

The "temp" is no longer used.

8 years agolib-mail: message_header_encode() cleanup - simplify pointer arithmetic
Timo Sirainen [Wed, 13 Sep 2017 20:35:04 +0000 (23:35 +0300)] 
lib-mail: message_header_encode() cleanup - simplify pointer arithmetic

This should make static analyzers happier.

8 years agoglobal: Add asserts to help static analyzers
Timo Sirainen [Wed, 13 Sep 2017 20:26:49 +0000 (23:26 +0300)] 
global: Add asserts to help static analyzers

8 years agolib-index: Remove size from struct mail_keywords.idx[]
Timo Sirainen [Wed, 13 Sep 2017 20:24:01 +0000 (23:24 +0300)] 
lib-index: Remove size from struct mail_keywords.idx[]

This was confusing static analyzers, which thought that using [1] meant that
its size really was 1.

8 years agoman: Remove extra ^L from "doveadm fetch" example
Timo Sirainen [Wed, 13 Sep 2017 15:06:43 +0000 (18:06 +0300)] 
man: Remove extra ^L from "doveadm fetch" example

It's no longer sent.

8 years agolib-storage: Fix updating mailbox GUID in mailbox list index when it's empty
Timo Sirainen [Wed, 13 Sep 2017 13:13:34 +0000 (16:13 +0300)] 
lib-storage: Fix updating mailbox GUID in mailbox list index when it's empty

Normally the GUID shouldn't be empty at this point. Updating mailbox GUID is
also very rare. So this was unlikely to cause any problems in practise.

8 years agomaster: Don't send uninitialized byte to anvil along the log fd.
Timo Sirainen [Wed, 13 Sep 2017 13:09:05 +0000 (16:09 +0300)] 
master: Don't send uninitialized byte to anvil along the log fd.

The byte was ignored by anvil, so it didn't cause any real problems.

8 years agocassandra: NULL values' sizes weren't initialized
Timo Sirainen [Wed, 13 Sep 2017 13:06:48 +0000 (16:06 +0300)] 
cassandra: NULL values' sizes weren't initialized

This was only a problem if sql_result_get_field_value_binary() was
attempted to be used for a NULL value.

8 years agolib-index: If mail_index_view is leaked, include in Panic the file:line where it...
Timo Sirainen [Wed, 13 Sep 2017 15:32:23 +0000 (18:32 +0300)] 
lib-index: If mail_index_view is leaked, include in Panic the file:line where it was opened

8 years agocassandra: Fix paged queries to work again
Timo Sirainen [Wed, 13 Sep 2017 12:16:59 +0000 (15:16 +0300)] 
cassandra: Fix paged queries to work again

When continuing the result, consistency was reset to 0 (=ANY), which caused
the queries to fail. There's no need to initialize the statement again when
continuing it. Also set result->consistency to be correct mainly for
debugging purposes.

8 years agolib-storage: Fix mailbox list notification assert-crash when mailbox is deleted
Timo Sirainen [Mon, 11 Sep 2017 09:27:17 +0000 (12:27 +0300)] 
lib-storage: Fix mailbox list notification assert-crash when mailbox is deleted

Reproduced with if IMAP NOTIFY is used for non-selected mailboxes without
MailboxName being specified. Another session then does changes to a
mailbox and immediately deletes it, which causes the crash.

Fixes:
Panic: file mailbox-list-index-notify.c: line 751: unreached

8 years agolib-smtp: lmtp-client: Fixed handling of unexpected reply while sending RCPT TO commands.
Stephan Bosch [Tue, 12 Sep 2017 22:28:38 +0000 (00:28 +0200)] 
lib-smtp: lmtp-client: Fixed handling of unexpected reply while sending RCPT TO commands.

It caused a segfault.

8 years agodoveadm director kick: Fix -f parameter to work
Timo Sirainen [Fri, 8 Sep 2017 13:00:53 +0000 (16:00 +0300)] 
doveadm director kick: Fix -f parameter to work

It already worked as --passdb-field, but now it matches the usage string.

8 years agolib-index: mail_index_use_existing_permissions() - Ignore with INDEX=MEMORY
Timo Sirainen [Mon, 11 Sep 2017 09:59:27 +0000 (12:59 +0300)] 
lib-index: mail_index_use_existing_permissions() - Ignore with INDEX=MEMORY

8 years agolib-index: mail_index_use_existing_permissions() - Log error if stat() unexpectedly...
Timo Sirainen [Mon, 11 Sep 2017 09:58:28 +0000 (12:58 +0300)] 
lib-index: mail_index_use_existing_permissions() - Log error if stat() unexpectedly fails

8 years agolib-storage: Avoid unnecessary stat()s in mailbox list index notifications
Timo Sirainen [Mon, 11 Sep 2017 10:54:12 +0000 (13:54 +0300)] 
lib-storage: Avoid unnecessary stat()s in mailbox list index notifications

If mailbox list gets a notification there's no need to stat() the INBOX, and
vice versa. Also if the notification was already seen and a callback timeout
set, there's no need to keep stat()ing.

8 years agolib-storage: Make sure mailbox list notification flush sees latest changes.
Timo Sirainen [Mon, 11 Sep 2017 10:48:17 +0000 (13:48 +0300)] 
lib-storage: Make sure mailbox list notification flush sees latest changes.

This is mainly useful with imaptest test scripts to make sure they're seeing
the changes done by the other session, without assuming that inotify will
always notify about the change before NOOP is run (it doesn't).

Do this only if mailbox_idle_check_interval>0, so it's not run when periodic
stat()s are wanted to be avoided.

8 years agolib: file_lock_set_unlink_on_free() - Avoid unlink() if another process is waiting...
Timo Sirainen [Tue, 12 Sep 2017 11:54:57 +0000 (14:54 +0300)] 
lib: file_lock_set_unlink_on_free() - Avoid unlink() if another process is waiting on the lock

8 years agocassandra: Disable prepared statements with protocol v3 and older
Timo Sirainen [Tue, 12 Sep 2017 10:23:51 +0000 (13:23 +0300)] 
cassandra: Disable prepared statements with protocol v3 and older

8 years agolib-smtp: Link with libcharset.la to avoid errors
Timo Sirainen [Mon, 11 Sep 2017 09:10:49 +0000 (12:10 +0300)] 
lib-smtp: Link with libcharset.la to avoid errors

8 years agolib-http: client: queue: Improved construction of timeout log message.
Stephan Bosch [Sat, 9 Sep 2017 10:58:12 +0000 (12:58 +0200)] 
lib-http: client: queue: Improved construction of timeout log message.

Earlier change used a literal prefix size, rather than inferring the size from the actual prefix string.

8 years agolib-smtp: test-smtp-submit: Fixed memory leak in one test.
Stephan Bosch [Sat, 9 Sep 2017 10:27:16 +0000 (12:27 +0200)] 
lib-smtp: test-smtp-submit: Fixed memory leak in one test.

8 years agolib-smtp: test-smtp-submit: Improved checking of delivered message.
Stephan Bosch [Sat, 9 Sep 2017 10:22:47 +0000 (12:22 +0200)] 
lib-smtp: test-smtp-submit: Improved checking of delivered message.

This addresses a couple of scan-build "dead assignment" warnings.

8 years agolib-smtp: smtp-submit: Added support for asynchronous message submission.
Stephan Bosch [Fri, 5 May 2017 15:06:32 +0000 (17:06 +0200)] 
lib-smtp: smtp-submit: Added support for asynchronous message submission.

8 years agolib-lda: Moved smtp-submit to lib-smtp.
Stephan Bosch [Fri, 5 May 2017 11:26:46 +0000 (13:26 +0200)] 
lib-lda: Moved smtp-submit to lib-smtp.

8 years agolib-lda: Made smtp-submit standalone.
Stephan Bosch [Fri, 5 May 2017 11:21:16 +0000 (13:21 +0200)] 
lib-lda: Made smtp-submit standalone.

Removed dependencies on LDA.

8 years agolib-lda: Renamed smtp-client to smtp-submit (2/2).
Stephan Bosch [Fri, 5 May 2017 11:06:39 +0000 (13:06 +0200)] 
lib-lda: Renamed smtp-client to smtp-submit (2/2).

Renamed smtp_client identifiers to smtp_submit.
Also, created temporary backwards-compatibility in smtp-client.h.

8 years agolib-lda: Renamed smtp-client to smtp-submit (1/2).
Stephan Bosch [Fri, 5 May 2017 10:55:49 +0000 (12:55 +0200)] 
lib-lda: Renamed smtp-client to smtp-submit (1/2).

Renamed the files.

8 years agolib-lda: Created tests for SMTP message submission using the smtp-client API.
Stephan Bosch [Tue, 28 Feb 2017 22:56:47 +0000 (23:56 +0100)] 
lib-lda: Created tests for SMTP message submission using the smtp-client API.

8 years agolib-storage: Preserve messages' vsize record when rebuilding index
Timo Sirainen [Fri, 8 Sep 2017 09:20:21 +0000 (12:20 +0300)] 
lib-storage: Preserve messages' vsize record when rebuilding index

Since vsize is often used by quota, losing this can be very expensive.
If the vsize is wrong, it gets fixed automatically when fetching the
message body.

8 years agocassandra: Add support for prepared statements
Timo Sirainen [Tue, 22 Aug 2017 11:35:11 +0000 (14:35 +0300)] 
cassandra: Add support for prepared statements

8 years agocassandra: Cleanup - Create statement earlier
Timo Sirainen [Tue, 22 Aug 2017 10:55:15 +0000 (13:55 +0300)] 
cassandra: Cleanup - Create statement earlier

Simplifies the following changes

8 years agocassandra: sql_transaction_commit*() cleanup - handle multiple query failures earlier
Timo Sirainen [Thu, 24 Aug 2017 08:56:38 +0000 (11:56 +0300)] 
cassandra: sql_transaction_commit*() cleanup - handle multiple query failures earlier

This makes the handling same for the sync and async method. It also
simplifies code for the following commits.

8 years agocassandra: sql_transaction_commit_s() - Set query_type correctly
Timo Sirainen [Thu, 24 Aug 2017 08:13:32 +0000 (11:13 +0300)] 
cassandra: sql_transaction_commit_s() - Set query_type correctly

The queries were all sent with READ type instead of WRITE/DELETE. This
meant they were using potentially wrong consistency values. Although
synchronous commits aren't actually used anywhere, so this practically
this doesn't fix anything right now.

8 years agocassandra: sql_transaction_commit_s() - Don't allow multi-query transactions
Timo Sirainen [Thu, 24 Aug 2017 08:09:05 +0000 (11:09 +0300)] 
cassandra: sql_transaction_commit_s() - Don't allow multi-query transactions

They were already denied for asynchronous commits. Also the synchronous
commits aren't actually used anywhere, so this shouldn't break anything.

8 years agodict-sql: Use prepared statements
Timo Sirainen [Thu, 7 Sep 2017 12:40:16 +0000 (15:40 +0300)] 
dict-sql: Use prepared statements

Create a hash table of query template -> prepared statement and fill it out
as needed. This could have been done some alternative ways that wouldn't
require building the string first, but this should still be fast enough and
much easier to implement.

8 years agodict-sql: Flush pending atomic_inc on set, and pending set on atomic_inc
Timo Sirainen [Sat, 26 Aug 2017 20:27:21 +0000 (23:27 +0300)] 
dict-sql: Flush pending atomic_inc on set, and pending set on atomic_inc

8 years agodict-sql: Cleanup - change query generator functions to return statement
Timo Sirainen [Sat, 26 Aug 2017 20:17:45 +0000 (23:17 +0300)] 
dict-sql: Cleanup - change query generator functions to return statement

Instead of query+params. This is in preparation for the following changes.

8 years agodict-sql: Cleanup - Remove unnecessary code
Timo Sirainen [Tue, 15 Aug 2017 13:50:16 +0000 (16:50 +0300)] 
dict-sql: Cleanup - Remove unnecessary code

The values are explicitly added to params. sql_dict_update_query() doesn't
add them again. Since the "diff" parameter is already a long long type,
this avoids unnecessary conversion to string and back.