Mercurial > dovecot > core-2.2
changeset 19007:c3bea195a020
imap: Fixed hibernation to work with non-TCP connections.
Mainly meaning UNIX socket connections from login processes, which are
proxying TLS connections.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 25 Aug 2015 18:27:44 +0300 |
parents | 5ec09852704a |
children | eeefd9b14eec |
files | src/imap/imap-client-hibernate.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/imap/imap-client-hibernate.c Tue Aug 25 17:03:19 2015 +0300 +++ b/src/imap/imap-client-hibernate.c Tue Aug 25 18:27:44 2015 +0300 @@ -49,7 +49,8 @@ str_append_tabescaped(cmd, client->user->set->mail_log_prefix); str_printfa(cmd, "\tidle_notify_interval=%u", client->set->imap_idle_notify_interval); - if (net_getpeername(client->fd_in, &peer_ip, &peer_port) == 0) { + if (net_getpeername(client->fd_in, &peer_ip, &peer_port) == 0 && + peer_port != 0) { str_printfa(cmd, "\tpeer_ip=%s\tpeer_port=%u", net_ip2addr(&peer_ip), peer_port); }