~ubuntu-branches/ubuntu/wily/dovecot/wily

« back to all changes in this revision

Viewing changes to src/director/director.c

  • Committer: Package Import Robot
  • Author(s): Jelmer Vernooij
  • Date: 2015-05-24 15:01:19 UTC
  • mto: (4.1.53 sid)
  • mto: This revision was merged to the branch mainline in revision 102.
  • Revision ID: package-import@ubuntu.com-20150524150119-hsh6cbr1fqseapga
Tags: upstream-2.2.18
ImportĀ upstreamĀ versionĀ 2.2.18

Show diffs side-by-side

added added

removed removed

Lines of Context:
109
109
        if (director_has_outgoing_connection(dir, host))
110
110
                return 0;
111
111
 
112
 
        dir_debug("Connecting to %s:%u",
113
 
                  net_ip2addr(&host->ip), host->port);
 
112
        if (director_debug) {
 
113
                string_t *str = t_str_new(128);
 
114
 
 
115
                str_printfa(str, "Connecting to %s:%u (as %s",
 
116
                            net_ip2addr(&host->ip), host->port,
 
117
                            net_ip2addr(&dir->self_ip));
 
118
                if (host->last_network_failure > 0) {
 
119
                        str_printfa(str, ", last network failure %ds ago",
 
120
                                    (int)(ioloop_time - host->last_network_failure));
 
121
                }
 
122
                if (host->last_protocol_failure > 0) {
 
123
                        str_printfa(str, ", last protocol failure %ds ago",
 
124
                                    (int)(ioloop_time - host->last_protocol_failure));
 
125
                }
 
126
                dir_debug("%s", str_c(str));
 
127
        }
114
128
        port = dir->test_port != 0 ? dir->test_port : host->port;
115
129
        fd = net_connect_ip(&host->ip, port, &dir->self_ip);
116
130
        if (fd == -1) {