Timo Sirainen [Sun, 10 Mar 2013 17:54:51 +0000 (19:54 +0200)]
lib-http: If host can't be connected to, don't keep retrying with more than one connection.
This also fixes infinitely trying to reconnect to host and retry.
Timo Sirainen [Tue, 5 Mar 2013 19:44:07 +0000 (21:44 +0200)]
lib-http: Avoid hanging on urgent requests.
Patch by Timo & Stephan. There are still some problems though, all urgent
requests don't seem to get a new connection.
Timo Sirainen [Tue, 26 Feb 2013 15:18:18 +0000 (17:18 +0200)]
istream-seekable: Don't forcibly close underlying streams when stream is destroyed.
The underlying streams may still have references and be reused for other
purposes.
Timo Sirainen [Tue, 26 Feb 2013 13:55:16 +0000 (15:55 +0200)]
lib-http: Track peers using a linked list also.
Mainly because this makes it much easier to debug using gdb. The overhead
isn't that much extra either.
Timo Sirainen [Tue, 26 Feb 2013 11:03:30 +0000 (13:03 +0200)]
lib-http: Track list of hosts using a linked list also.
http_client_switch_ioloop() is done very often, and scanning a few entries
in a linked list is much faster than going through a hash table.
Timo Sirainen [Tue, 26 Feb 2013 09:30:11 +0000 (11:30 +0200)]
lib-storage: Write dovecot.mailbox.log entries using virtual names, not storage names.
This file is used only by dsync, and the new dsync design uses only virtual
names everywhere. This of course means that now it's not easily possible to
use different virtual names for the same user, but nobody really did that
before anyway. The only other fully working solution would be to send both
the virtual and the storage names in dsync, but that's a bit of a waste.
Timo Sirainen [Mon, 25 Feb 2013 14:12:49 +0000 (16:12 +0200)]
Reverted the recent hash.h changes. Instead use -Wno-duplicate-decl-specifier with clang.
The modified version required hash table users to know the structs'
contents, which isn't otherwise necessary.
Timo Sirainen [Sun, 24 Feb 2013 16:19:40 +0000 (18:19 +0200)]
lmtp: Log a bit nicer message when client QUITs.
I did think about removing the connect and successful disconnect messages
entirely, but these may be useful when debugging problems with MTA.
Timo Sirainen [Sun, 24 Feb 2013 14:33:24 +0000 (16:33 +0200)]
lib-storage: Added MAIL_FETCH_REFCOUNT for getting mail's reference count.
This is useful only for backends where mailbox_copy() increases the
refcount. With maildir&sdbox it can be looked up from the file's link count.
With mdbox the refcount is stored in the map index. Other formats don't
currently implement this.
Timo Sirainen [Sun, 24 Feb 2013 14:15:23 +0000 (16:15 +0200)]
lib-settings: Parse block names {} case-insensitively.
This fixes namespace { mailbox foo { .. } } settings when they go through
environment and get uppercased.
Timo Sirainen [Sun, 24 Feb 2013 13:52:57 +0000 (15:52 +0200)]
lib-storage: Fixed setting \Recent flags for sessions that didn't drop them.
If another session wasn't dropping the \Recent flags, no new mails were
getting them unless the mailbox was reopened.
Timo Sirainen [Sun, 24 Feb 2013 13:50:26 +0000 (15:50 +0200)]
lib-storage: Fixed \Recent flag race conditions.
The \Recent flags should only be set while locked within
mail_index_sync_begin()..commit(). The following view syncing syncs only up
to how far the index was synced, so it won't see any new messages that
haven't yet been assigned a \Recent flag.
Timo Sirainen [Sun, 24 Feb 2013 07:16:31 +0000 (09:16 +0200)]
Replaced all -1U and (unsigned int)-1 with UINT_MAX.
It's somewhat clearer this way. Also clang's -fsanitize=integer gives
runtime errors about -1U (but not about explicit casts, so no need to change
(type)-1 casts).