Skip to content

Commit

Permalink
lib-program-client: test-program-client-unix: Create body stream only…
Browse files Browse the repository at this point in the history
… once in test_program_input_handle().
  • Loading branch information
stephanbosch authored and cmouse committed Mar 18, 2018
1 parent 4712d0a commit 42d2755
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/lib-program-client/test-program-client-unix.c
Expand Up @@ -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",
Expand Down

0 comments on commit 42d2755

Please sign in to comment.