From 9f23fb31aab10801e08847379be432d7287c9f0d Mon Sep 17 00:00:00 2001 From: Daniel Roethlisberger Date: Mon, 27 May 2013 00:03:05 +0200 Subject: [PATCH] Log new bev connections to debug log --- pxyconn.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pxyconn.c b/pxyconn.c index 4faf317..3e4bec6 100644 --- a/pxyconn.c +++ b/pxyconn.c @@ -1505,6 +1505,14 @@ pxy_conn_connect(pxy_conn_ctx_t *ctx) return; } + if (OPTS_DEBUG(ctx->opts)) { + char *ip = sys_sockaddr_str((struct sockaddr *)&ctx->addr, + ctx->addrlen); + log_dbg_printf("Connecting to %s\n", ip); + if (ip) + free(ip); + } + /* initiate connection */ bufferevent_socket_connect(ctx->dst.bev, (struct sockaddr *)&ctx->addr,