Skip to content

Commit

Permalink
dsync: ibc - reference iostreams internally
Browse files Browse the repository at this point in the history
This makes it clearer who needs to reference and unreference the streams.
  • Loading branch information
sirainen committed Aug 22, 2018
1 parent 4f290b8 commit 9705af1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/doveadm/doveadm-dsync.c
Original file line number Diff line number Diff line change
Expand Up @@ -521,8 +521,6 @@ cmd_dsync_ibc_stream_init(struct dsync_cmd_context *ctx,
iostream_rawlog_create_path(ctx->rawlog_path,
&ctx->input, &ctx->output);
}
i_stream_ref(ctx->input);
o_stream_ref(ctx->output);
return dsync_ibc_init_stream(ctx->input, ctx->output,
name, temp_prefix, ctx->io_timeout_secs);
}
Expand Down
2 changes: 2 additions & 0 deletions src/doveadm/dsync/dsync-ibc-stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -2110,6 +2110,8 @@ dsync_ibc_init_stream(struct istream *input, struct ostream *output,
ibc->ibc.v = dsync_ibc_stream_vfuncs;
ibc->input = input;
ibc->output = output;
i_stream_ref(ibc->input);
o_stream_ref(ibc->output);
ibc->name = i_strdup(name);
ibc->temp_path_prefix = i_strdup(temp_path_prefix);
ibc->timeout_secs = timeout_secs;
Expand Down

0 comments on commit 9705af1

Please sign in to comment.