]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
login-proxy: Don't call input_callback on destroy
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Thu, 30 Apr 2020 09:23:11 +0000 (12:23 +0300)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Mon, 25 May 2020 08:38:55 +0000 (08:38 +0000)
All the failure code paths now call failure_callback instead.

src/login-common/client-common-auth.c
src/login-common/login-proxy.c

index 3d9e8210ed503ccb4ce6d8ddee153dfe642c3320..4ad0da78e6bf703ceffe6baf692662542641be99 100644 (file)
@@ -331,27 +331,7 @@ static void proxy_input(struct client *client)
        const char *line;
        unsigned int duration;
 
-       if (client->login_proxy == NULL) {
-               /* we're just freeing the proxy */
-               return;
-       }
-
        input = login_proxy_get_istream(client->login_proxy);
-       if (input == NULL) {
-               if (client->destroyed) {
-                       /* we came here from client_destroy() */
-                       return;
-               }
-
-               /* failed for some reason, probably server disconnected */
-               login_proxy_failed(client->login_proxy,
-                                  login_proxy_get_event(client->login_proxy),
-                                  LOGIN_PROXY_FAILURE_TYPE_CONNECT, NULL);
-               return;
-       }
-
-       i_assert(!client->destroyed);
-
        switch (i_stream_read(input)) {
        case -2:
                login_proxy_failed(client->login_proxy,
index 47106f33adc7d2c00f140cc80432615087a13945..4377883a9937d5dd90df428dbe46bd5a4aed1a88 100644 (file)
@@ -528,9 +528,6 @@ login_proxy_free_full(struct login_proxy **_proxy, const char *reason,
                i_assert(proxy->client_output == NULL);
 
                DLLIST_REMOVE(&login_proxies_pending, proxy);
-
-               if (proxy->input_callback != NULL)
-                       proxy->input_callback(proxy->client);
        }
        client->login_proxy = NULL;