projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Writer: set the discarded events's value before serializing
[babeltrace.git]
/
formats
/
ctf
/
ir
/
stream.c
diff --git
a/formats/ctf/ir/stream.c
b/formats/ctf/ir/stream.c
index c0b4e979a9ff9195b21e323bc7402110cafe335e..3de77b4182c7801fbe32d7aa3f8abced8a535a03 100644
(file)
--- a/
formats/ctf/ir/stream.c
+++ b/
formats/ctf/ir/stream.c
@@
-939,30
+939,23
@@
int bt_ctf_stream_flush(struct bt_ctf_stream *stream)
goto end;
}
goto end;
}
- /* Write packet context */
- memcpy(&packet_context_pos, &stream->pos,
- sizeof(struct ctf_stream_pos));
- ret = bt_ctf_field_serialize(stream->packet_context,
- &stream->pos);
- if (ret) {
- goto end;
- }
-
ret = bt_ctf_stream_get_discarded_events_count(stream,
&events_discarded);
if (ret) {
goto end;
}
ret = bt_ctf_stream_get_discarded_events_count(stream,
&events_discarded);
if (ret) {
goto end;
}
- /* Unset the packet context's fields. */
-
ret = bt_ctf_field_reset(stream->packet_context
);
+ ret = set_structure_field_integer(stream->packet_context,
+
"events_discarded", events_discarded
);
if (ret) {
goto end;
}
if (ret) {
goto end;
}
- /* Set the previous number of discarded events. */
- ret = set_structure_field_integer(stream->packet_context,
- "events_discarded", events_discarded);
+ /* Write packet context */
+ memcpy(&packet_context_pos, &stream->pos,
+ sizeof(struct ctf_stream_pos));
+ ret = bt_ctf_field_serialize(stream->packet_context,
+ &stream->pos);
if (ret) {
goto end;
}
if (ret) {
goto end;
}
This page took
0.023285 seconds
and
4
git commands to generate.