]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-program-client: test-program-client-unix: Create body stream only once in test_pr...
authorStephan Bosch <stephan.bosch@dovecot.fi>
Sun, 25 Feb 2018 16:56:15 +0000 (17:56 +0100)
committerAki Tuomi <aki.tuomi@dovecot.fi>
Sun, 18 Mar 2018 10:53:18 +0000 (12:53 +0200)
src/lib-program-client/test-program-client-unix.c

index 386bfd48ffe32779a43aa23d7af15260996853ee..19ecc5d20de0d518ff571065b125e7d8c90a9bc8 100644 (file)
@@ -106,8 +106,10 @@ test_program_input_handle(struct test_client *client, const char *line)
                array_append(&client->args, &arg, 1);
                break;
        case CLIENT_STATE_BODY:
-               client->os_body = iostream_temp_create_named(
-                       ".dovecot.test.", 0, "test_program_input body");
+               if (client->os_body == NULL) {
+                       client->os_body = iostream_temp_create_named(
+                               ".dovecot.test.", 0, "test_program_input body");
+               }
                switch(o_stream_send_istream(client->os_body, client->in)) {
                case OSTREAM_SEND_ISTREAM_RESULT_ERROR_OUTPUT:
                        i_panic("Cannot write to ostream-temp: %s",