]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
login-common: client_alloc() - remove unnecessary ssl parameter
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Tue, 31 Oct 2017 23:06:05 +0000 (01:06 +0200)
committerTimo Sirainen <tss@dovecot.fi>
Mon, 6 Nov 2017 23:09:00 +0000 (01:09 +0200)
src/login-common/client-common.c
src/login-common/client-common.h
src/login-common/main.c

index 350565dff98667fd5f5d8228f4b2a9ab9d4602ca..f57b264fb861da96bec2db0219ce7910921cf76d 100644 (file)
@@ -152,7 +152,7 @@ static bool client_is_trusted(struct client *client)
 }
 
 struct client *
-client_alloc(int fd, bool ssl, pool_t pool,
+client_alloc(int fd, pool_t pool,
             const struct master_service_connection *conn,
             const struct login_settings *set,
             const struct master_service_ssl_settings *ssl_set)
@@ -178,8 +178,6 @@ client_alloc(int fd, bool ssl, pool_t pool,
        p_array_init(&client->module_contexts, client->pool, 5);
 
        client->fd = fd;
-       client->tls = ssl;
-
        client->local_ip = conn->local_ip;
        client->local_port = conn->local_port;
        client->ip = conn->remote_ip;
@@ -196,7 +194,7 @@ client_alloc(int fd, bool ssl, pool_t pool,
                client->local_name = conn->proxy.hostname;
                client->client_cert_common_name = conn->proxy.cert_common_name;
        } else {
-               client->secured = ssl || client->trusted ||
+               client->secured = client->trusted ||
                        net_ip_compare(&conn->real_remote_ip, &conn->real_local_ip);
        }
        client->proxy_ttl = LOGIN_PROXY_TTL;
index cc1127fad95c71bb4e80adb0199c08d12ce1e717..e49fca13d254d365e1affc2584baaef77af3a442 100644 (file)
@@ -238,7 +238,7 @@ void login_client_hooks_add(struct module *module,
 void login_client_hooks_remove(const struct login_client_hooks *hooks);
 
 struct client *
-client_alloc(int fd, bool ssl, pool_t pool,
+client_alloc(int fd, pool_t pool,
             const struct master_service_connection *conn,
             const struct login_settings *set,
             const struct master_service_ssl_settings *ssl_set);
index b75fcac8d835387c96a6313dafc3d22808fff2ba..8f1d79e91f4d12820fafcd9b950e7b2e00b1a510 100644 (file)
@@ -125,8 +125,7 @@ client_connected_finish(const struct master_service_connection *conn)
        set = login_settings_read(pool, &conn->local_ip,
                                  &conn->remote_ip, NULL, &ssl_set, &other_sets);
 
-       client = client_alloc(conn->fd, FALSE, pool, conn,
-                             set, ssl_set);
+       client = client_alloc(conn->fd, pool, conn, set, ssl_set);
        if (ssl_connections || conn->ssl) {
                if (client_init_ssl(client) < 0) {
                        client_unref(&client);