]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: auth-worker-client: Move auth_worker_request_finished*()
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Thu, 31 Oct 2019 13:31:57 +0000 (15:31 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Fri, 12 Mar 2021 12:18:13 +0000 (12:18 +0000)
src/auth/auth-worker-client.c

index f7886d02cd5180ae4d8d4d3692c4ba8255500812..9fc2eca20a348b1693091ddded8bbe614376c1c7 100644 (file)
@@ -65,6 +65,29 @@ static struct auth_worker_client *auth_worker_get_client(void)
        return client;
 }
 
+void auth_worker_refresh_proctitle(const char *state)
+{
+       if (!global_auth_settings->verbose_proctitle || !worker)
+               return;
+
+       if (auth_worker_client_error)
+               state = "error";
+       else if (!auth_worker_has_client())
+               state = "waiting for connection";
+       process_title_set(t_strdup_printf("worker: %s", state));
+}
+
+static void
+auth_worker_client_check_throttle(struct auth_worker_client *client)
+{
+       if (o_stream_get_buffer_used_size(client->conn.output) >=
+           OUTBUF_THROTTLE_SIZE) {
+               /* stop reading new requests until client has read the pending
+                  replies. */
+               connection_input_halt(&client->conn);
+       }
+}
+
 static void
 auth_worker_request_finished_full(struct auth_worker_command *cmd,
                                  const char *error, bool log_as_error)
@@ -95,29 +118,6 @@ static void auth_worker_request_finished_bug(struct auth_worker_command *cmd,
        auth_worker_request_finished_full(cmd, error, TRUE);
 }
 
-void auth_worker_refresh_proctitle(const char *state)
-{
-       if (!global_auth_settings->verbose_proctitle || !worker)
-               return;
-
-       if (auth_worker_client_error)
-               state = "error";
-       else if (!auth_worker_has_client())
-               state = "waiting for connection";
-       process_title_set(t_strdup_printf("worker: %s", state));
-}
-
-static void
-auth_worker_client_check_throttle(struct auth_worker_client *client)
-{
-       if (o_stream_get_buffer_used_size(client->conn.output) >=
-           OUTBUF_THROTTLE_SIZE) {
-               /* stop reading new requests until client has read the pending
-                  replies. */
-               connection_input_halt(&client->conn);
-       }
-}
-
 bool auth_worker_auth_request_new(struct auth_worker_command *cmd, unsigned int id,
                                  const char *const *args, struct auth_request **request_r)
 {