projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
UST consumer: perform buffer flush on hang up
[lttng-tools.git]
/
liblttng-ustconsumer
/
lttng-ustconsumer.c
diff --git
a/liblttng-ustconsumer/lttng-ustconsumer.c
b/liblttng-ustconsumer/lttng-ustconsumer.c
index 29f735249417709191f344974decbb1f3676fdb3..806ebd3c03977f340245ed41e98047a7255461fc 100644
(file)
--- a/
liblttng-ustconsumer/lttng-ustconsumer.c
+++ b/
liblttng-ustconsumer/lttng-ustconsumer.c
@@
-175,6
+175,7
@@
int lttng_ustconsumer_recv_cmd(struct lttng_consumer_local_data *ctx,
msg.u.channel.mmap_len,
msg.u.channel.max_sb_size);
if (new_channel == NULL) {
msg.u.channel.mmap_len,
msg.u.channel.max_sb_size);
if (new_channel == NULL) {
+ fprintf(stderr, "AAAAA\n");
lttng_consumer_send_error(ctx, CONSUMERD_OUTFD_ERROR);
goto end_nosignal;
}
lttng_consumer_send_error(ctx, CONSUMERD_OUTFD_ERROR);
goto end_nosignal;
}
@@
-217,6
+218,7
@@
int lttng_ustconsumer_recv_cmd(struct lttng_consumer_local_data *ctx,
msg.u.stream.output,
msg.u.stream.path_name);
if (new_stream == NULL) {
msg.u.stream.output,
msg.u.stream.path_name);
if (new_stream == NULL) {
+ fprintf(stderr, "BBBBBB\n");
lttng_consumer_send_error(ctx, CONSUMERD_OUTFD_ERROR);
goto end;
}
lttng_consumer_send_error(ctx, CONSUMERD_OUTFD_ERROR);
goto end;
}
@@
-281,6
+283,11
@@
int lttng_ustconsumer_allocate_channel(struct lttng_consumer_channel *chan)
return 0;
}
return 0;
}
+void lttng_ustconsumer_on_stream_hangup(struct lttng_consumer_stream *stream)
+{
+ ustctl_flush_buffer(stream->chan->handle, stream->buf, 0);
+}
+
void lttng_ustconsumer_del_channel(struct lttng_consumer_channel *chan)
{
ustctl_unmap_channel(chan->handle);
void lttng_ustconsumer_del_channel(struct lttng_consumer_channel *chan)
{
ustctl_unmap_channel(chan->handle);
This page took
0.024119 seconds
and
4
git commands to generate.