From: Stephan Bosch Date: Thu, 28 Feb 2019 08:41:34 +0000 (+0100) Subject: lib-http: http-client-connection - Use the default connection label. X-Git-Tag: 2.3.9~721 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=29f178bd5b5811dbbb7a6cd0461937431bfb0692;p=thirdparty%2Fdovecot%2Fcore.git lib-http: http-client-connection - Use the default connection label. --- diff --git a/src/lib-http/http-client-connection.c b/src/lib-http/http-client-connection.c index 48924b2d25..29070a0c7f 100644 --- a/src/lib-http/http-client-connection.c +++ b/src/lib-http/http-client-connection.c @@ -1537,7 +1537,8 @@ static const struct connection_settings http_client_connection_set = { .input_max_size = (size_t)-1, .output_max_size = (size_t)-1, .client = TRUE, - .delayed_unix_client_connected_callback = TRUE + .delayed_unix_client_connected_callback = TRUE, + .log_connection_id = TRUE, }; static const struct connection_vfuncs http_client_connection_vfuncs = { @@ -1710,15 +1711,14 @@ http_client_connection_create(struct http_client_peer *peer) i_array_init(&conn->request_wait_list, 16); conn->io_wait_timer = io_wait_timer_add_to(cctx->ioloop); - conn->label = i_strdup_printf("%s [%d]", - http_client_peer_shared_label(pshared), conn->id); conn->event = event_create(ppool->peer->cctx->event); - event_set_append_log_prefix(conn->event, - t_strdup_printf("conn %s: ", conn->label)); conn->conn.event_parent = conn->event; connection_init(cctx->conn_list, &conn->conn, NULL); + event_set_append_log_prefix( + conn->event, t_strdup_printf("conn %s: ", conn->conn.label)); + switch (pshared->addr.type) { case HTTP_CLIENT_PEER_ADDR_HTTPS_TUNNEL: http_client_connection_connect_tunnel @@ -1847,7 +1847,6 @@ bool http_client_connection_unref(struct http_client_connection **_conn) io_wait_timer_remove(&conn->io_wait_timer); event_unref(&conn->event); - i_free(conn->label); i_free(conn); http_client_peer_pool_unref(&ppool); diff --git a/src/lib-http/http-client-private.h b/src/lib-http/http-client-private.h index 4aee291415..4a4ea80ca1 100644 --- a/src/lib-http/http-client-private.h +++ b/src/lib-http/http-client-private.h @@ -168,7 +168,6 @@ struct http_client_connection { struct http_client_peer_pool *ppool; struct http_client_peer *peer; - char *label; unsigned int id; // DEBUG: identify parallel connections int connect_errno;