]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-http: test-http-server-errors - Adjust log prefix code to match other similar...
authorStephan Bosch <stephan.bosch@open-xchange.com>
Mon, 11 Nov 2019 22:37:01 +0000 (23:37 +0100)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Fri, 22 May 2020 08:42:33 +0000 (08:42 +0000)
src/lib-http/test-http-server-errors.c

index 2adb08a8dd54478bd3f86efb47d82acdcaaad453..128ba6b229d05da7894b79eb9b59740197f1a47b 100644 (file)
@@ -960,12 +960,10 @@ test_run_client_server(const struct http_server_settings *server_set,
                                client_pids[i] = (pid_t)-1;
                                client_pids_count = 0;
                                hostpid_init();
-                               if (debug) {
-                                       i_debug("client[%d]: PID=%s",
-                                               i+1, my_pid);
-                               }
-                               i_set_failure_prefix("CLIENT[%u]: ", i + 1);
                                /* Child: client */
+                               i_set_failure_prefix("CLIENT[%u]: ", i + 1);
+                               if (debug)
+                                       i_debug("PID=%s", my_pid);
                                /* Wait a little for server setup */
                                i_sleep_msecs(100);
                                i_close_fd(&fd_listen);
@@ -980,19 +978,18 @@ test_run_client_server(const struct http_server_settings *server_set,
                                exit(1);
                        }
                }
-               if (debug)
-                       i_debug("server: PID=%s", my_pid);
-               i_set_failure_prefix("SERVER: ");
        }
 
        /* Parent: server */
-
+       i_set_failure_prefix("SERVER: ");
+       if (debug)
+               i_debug("PID=%s", my_pid);
        ioloop = io_loop_create();
        server_test(server_set);
        io_loop_destroy(&ioloop);
 
+       i_unset_failure_prefix();
        i_close_fd(&fd_listen);
-
        test_clients_kill_all();
        i_free(client_pids);
 }