projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ctf: make msg-iter not use bt_packet_context_field
[babeltrace.git]
/
src
/
lib
/
trace-ir
/
packet-context-field.c
diff --git
a/src/lib/trace-ir/packet-context-field.c
b/src/lib/trace-ir/packet-context-field.c
index 03219a2a1e712fab5a28d436111d2b78747916ad..c5a628c2e1e5ac96a8c51f69fa3a77bdfb8e7556 100644
(file)
--- a/
src/lib/trace-ir/packet-context-field.c
+++ b/
src/lib/trace-ir/packet-context-field.c
@@
-20,8
+20,8
@@
* SOFTWARE.
*/
* SOFTWARE.
*/
-#define BT_LOG_TAG "PACKET-CONTEXT-FIELD"
-#include "lib/l
ib-l
ogging.h"
+#define BT_LOG_TAG "
LIB/
PACKET-CONTEXT-FIELD"
+#include "lib/logging.h"
#include "lib/assert-pre.h"
#include <babeltrace2/trace-ir/packet-context-field.h>
#include "lib/assert-pre.h"
#include <babeltrace2/trace-ir/packet-context-field.h>
@@
-62,9
+62,10
@@
struct bt_packet_context_field *bt_packet_context_field_create(
{
struct bt_field_wrapper *field_wrapper;
{
struct bt_field_wrapper *field_wrapper;
+ BT_ASSERT_PRE_NO_ERROR();
BT_ASSERT_PRE_NON_NULL(stream_class, "Stream class");
BT_ASSERT_PRE_NON_NULL(stream_class, "Stream class");
- BT_ASSERT_PRE(stream_class->
frozen
,
- "Stream class
is not part of a trace class: %!
+S",
+ BT_ASSERT_PRE(stream_class->
supports_packets
,
+ "Stream class
does not support packets: %![sc-]
+S",
stream_class);
BT_ASSERT_PRE(stream_class->packet_context_fc,
"Stream class has no packet context field class: %!+S",
stream_class);
BT_ASSERT_PRE(stream_class->packet_context_fc,
"Stream class has no packet context field class: %!+S",
@@
-73,20
+74,14
@@
struct bt_packet_context_field *bt_packet_context_field_create(
&stream_class->packet_context_field_pool,
(void *) stream_class->packet_context_fc);
if (!field_wrapper) {
&stream_class->packet_context_field_pool,
(void *) stream_class->packet_context_fc);
if (!field_wrapper) {
- BT_LIB_LOGE("Cannot allocate one packet context field from stream class: "
+ BT_LIB_LOGE_APPEND_CAUSE(
+ "Cannot allocate one packet context field from stream class: "
"%![sc-]+S", stream_class);
"%![sc-]+S", stream_class);
- goto e
rror
;
+ goto e
nd
;
}
BT_ASSERT(field_wrapper->field);
bt_stream_class_freeze(stream_class);
}
BT_ASSERT(field_wrapper->field);
bt_stream_class_freeze(stream_class);
- goto end;
-
-error:
- if (field_wrapper) {
- bt_field_wrapper_destroy(field_wrapper);
- field_wrapper = NULL;
- }
end:
return (void *) field_wrapper;
end:
return (void *) field_wrapper;
This page took
0.033477 seconds
and
4
git commands to generate.