Clarify warning message for events discarded
[babeltrace.git] / formats / ctf-text / ctf-text.c
index 3b38ecaca9671fe88815ea5639ef264797f3212b..1d29390c7a1c5a5ed034c31cd0965b728704ca4d 100644 (file)
@@ -236,8 +236,8 @@ int ctf_text_write_event(struct stream_pos *ppos, struct ctf_stream_definition *
                return -EINVAL;
        }
        event_class = g_ptr_array_index(stream_class->events_by_id, id);
-       if (!event) {
-               fprintf(stderr, "[error] Event id %" PRIu64 " is unknown.\n", id);
+       if (!event_class) {
+               fprintf(stderr, "[error] Event class id %" PRIu64 " is unknown.\n", id);
                return -EINVAL;
        }
 
@@ -249,7 +249,7 @@ int ctf_text_write_event(struct stream_pos *ppos, struct ctf_stream_definition *
                ctf_print_timestamp(stderr, stream, stream->prev_timestamp);
                fprintf(stderr, "] and [");
                ctf_print_timestamp(stderr, stream, stream->prev_timestamp_end);
-               fprintf(stderr, "]. You should consider increasing the buffer size.\n");
+               fprintf(stderr, "]. You should consider recording a new trace with larger buffers or with fewer events enabled.\n");
                fflush(stderr);
                stream->events_discarded = 0;
        }
This page took 0.023656 seconds and 4 git commands to generate.