X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fconsumer.c;h=deebd2e2b353cd1cc4365f5ede45e78203e9653e;hp=761ce93753667f1b93d6f151c93a68d014855e7f;hb=a4b92340642035d1eafeb1eead0ad01f64d2007d;hpb=6197aea7399cfe3bb67f8602ba4c3122867ecf52 diff --git a/src/common/consumer.c b/src/common/consumer.c index 761ce9375..deebd2e2b 100644 --- a/src/common/consumer.c +++ b/src/common/consumer.c @@ -278,8 +278,12 @@ void consumer_del_stream(struct lttng_consumer_stream *stream) stream->relayd_stream_id, stream->next_net_seq_num - 1); if (ret < 0) { - ERR("Unable to close stream on the relayd. Continuing"); - /* Continue here. There is nothing we can do for the relayd.*/ + DBG("Unable to close stream on the relayd. Continuing"); + /* + * Continue here. There is nothing we can do for the relayd. + * Chances are that the relayd has closed the socket so we just + * continue cleaning up. + */ } /* Both conditions are met, we destroy the relayd. */ @@ -1095,7 +1099,11 @@ end: } /* - * Mmap the ring buffer, read it and write the data to the tracefile. + * Mmap the ring buffer, read it and write the data to the tracefile. This is a + * core function for writing trace buffers to either the local filesystem or + * the network. + * + * Careful review MUST be put if any changes occur! * * Returns the number of bytes written */ @@ -1168,12 +1176,6 @@ ssize_t lttng_consumer_on_read_subbuffer_mmap( written = ret; goto end; } - - /* - * We do this so the return value can match the len passed as - * argument to this function. - */ - written -= sizeof(stream->relayd_stream_id); } } /* Else, use the default set before which is the filesystem. */