stream->monitor = monitor;
stream->endpoint_status = CONSUMER_ENDPOINT_ACTIVE;
stream->index_fd = -1;
+ stream->last_sequence_number = -1ULL;
pthread_mutex_init(&stream->lock, NULL);
pthread_mutex_init(&stream->metadata_timer_lock, NULL);
outfd = stream->out_fd;
if (stream->index_fd >= 0) {
+ ret = close(stream->index_fd);
+ if (ret < 0) {
+ PERROR("Closing index");
+ goto end;
+ }
+ stream->index_fd = -1;
ret = index_create_file(stream->chan->pathname,
stream->name, stream->uid, stream->gid,
stream->chan->tracefile_size,
outfd = stream->out_fd;
if (stream->index_fd >= 0) {
+ ret = close(stream->index_fd);
+ if (ret < 0) {
+ PERROR("Closing index");
+ goto end;
+ }
+ stream->index_fd = -1;
ret = index_create_file(stream->chan->pathname,
stream->name, stream->uid, stream->gid,
stream->chan->tracefile_size,