Make API CTF-agnostic
[babeltrace.git] / lib / graph / notification / event.c
index 6251979d266a20f845334277302a1ea18077e725..4b50d7fefe5496135eff1ad29b69d75ab273d6e5 100644 (file)
@@ -84,7 +84,6 @@ struct bt_notification *bt_notification_event_create(
        struct bt_notification_event *notification = NULL;
        struct bt_event *event;
        struct bt_graph *graph;
-       int ret;
 
        BT_ASSERT_PRE_NON_NULL(notif_iter, "Notification iterator");
        BT_ASSERT_PRE_NON_NULL(event_class, "Event class");
@@ -104,20 +103,6 @@ struct bt_notification *bt_notification_event_create(
                goto error;
        }
 
-       /*
-        * Set packet's properties. This can fail so it happens before
-        * creating the notification below. We freeze it after we know
-        * this function succeeds.
-        */
-       if (unlikely(!packet->props_are_set)) {
-               ret = bt_packet_set_properties(packet);
-               if (ret) {
-                       BT_LIB_LOGE("Cannot update packet's properties: "
-                               "%![prev-packet-]+a", packet);
-                       goto error;
-               }
-       }
-
        /*
         * Create notification from pool _after_ we have everything
         * (in this case, a valid event object) so that we never have an
@@ -145,7 +130,7 @@ struct bt_notification *bt_notification_event_create(
        BT_ASSERT(!notification->event);
        notification->event = event;
        bt_packet_set_is_frozen(packet, true);
-       bt_packet_validate_properties(packet);
+       bt_event_class_freeze(event_class);
        BT_LOGD("Created event notification object: "
                "event-addr=%p, event-class-addr=%p, "
                "event-class-name=\"%s\", event-class-id=%" PRId64 ", "
This page took 0.025502 seconds and 4 git commands to generate.