Mercurial > dovecot > core-2.2
changeset 18692:4c4eff229426
lib-imap: Fixed crash in IDLE for non-TCP connections.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 14 May 2015 21:44:50 +0300 |
parents | d09429bdb340 |
children | 91bbd6753689 |
files | src/lib-imap/imap-keepalive.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-imap/imap-keepalive.c Thu May 14 14:02:13 2015 +0300 +++ b/src/lib-imap/imap-keepalive.c Thu May 14 21:44:50 2015 +0300 @@ -42,7 +42,7 @@ { unsigned int client_hash; - client_hash = imap_remote_ip_is_usable(ip) ? + client_hash = ip != NULL && imap_remote_ip_is_usable(ip) ? net_ip_hash(ip) : crc32_str(username); interval_secs -= (time(NULL) + client_hash) % interval_secs; return interval_secs * 1000;