Mercurial > dovecot > core-2.2
changeset 11579:61708c33154d HEAD
director: Debug message improvements.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 18 Jun 2010 16:28:36 +0100 |
parents | 2e686a6403e3 |
children | 6aa749b789ef |
files | src/director/director-connection.c |
diffstat | 1 files changed, 19 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/director/director-connection.c Fri Jun 18 16:28:14 2010 +0100 +++ b/src/director/director-connection.c Fri Jun 18 16:28:36 2010 +0100 @@ -341,6 +341,9 @@ { struct director *dir = conn->dir; + if (dir->debug) + i_debug("Handshaked to %s", conn->host->name); + conn->handshake_received = TRUE; if (conn->in) { /* handshaked to left side. tell it we've received the @@ -527,22 +530,29 @@ } /* remote suggests us to connect elsewhere */ - if (dir->debug) { - i_debug("Received CONNECT request to %s, " - "current right is %s", host->name, - dir->right == NULL ? "<none>" : - dir->right->name); - } - if (dir->right != NULL && director_host_cmp_to_self(host, dir->right->host, dir->self_host) <= 0) { /* the old connection is the correct one */ - if (dir->debug) - i_debug("Ignoring CONNECT"); + if (dir->debug) { + i_debug("Ignoring CONNECT request to %s " + "(current right is %s)", + host->name, dir->right->name); + } return TRUE; } + if (dir->debug) { + if (dir->right == NULL) { + i_debug("Received CONNECT request to %s, " + "initializing right", host->name); + } else { + i_debug("Received CONNECT request to %s, " + "replacing current right %s", + host->name, dir->right->name); + } + } + /* connect here, disconnect old one */ if (dir->right != NULL) director_connection_deinit(&dir->right);