Skip to content

Commit

Permalink
lib: monkey: sync channel release addition
Browse files Browse the repository at this point in the history
Signed-off-by: Leonardo Alminana <[email protected]>
  • Loading branch information
leonardo-albertovich committed Feb 21, 2022
1 parent 43d1a53 commit 4a84454
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/monkey/include/monkey/mk_stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ struct mk_stream *mk_stream_new(int type, struct mk_channel *channel,
int mk_channel_stream_write(struct mk_stream *stream, size_t *count);

struct mk_channel *mk_channel_new(int type, int fd);
int mk_channel_release(struct mk_channel *channel);

int mk_channel_flush(struct mk_channel *channel);
int mk_channel_write(struct mk_channel *channel, size_t *count);
Expand Down
5 changes: 5 additions & 0 deletions lib/monkey/mk_server/mk_stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ struct mk_channel *mk_channel_new(int type, int fd)
return channel;
}

int mk_channel_release(struct mk_channel *channel)
{
mk_mem_free(channel);
}

static inline size_t channel_write_in_file(struct mk_channel *channel,
struct mk_stream_input *in)
{
Expand Down

0 comments on commit 4a84454

Please sign in to comment.