Fix: event, stream names can be strings
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 9 Jun 2017 21:41:53 +0000 (17:41 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 9 Jun 2017 22:04:20 +0000 (18:04 -0400)
The code is too strict and enforces that they need to be CTF
identifiers, but it's valid to have those as simple strings.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
lib/ctf-ir/event-class.c
lib/ctf-ir/stream-class.c

index 9f82e176dcd286f0a6cf4f7aa20d1ac0ce45043d..67cb1575ec054b4e05a797c2dacf7bba16e7ce23 100644 (file)
@@ -59,12 +59,6 @@ struct bt_ctf_event_class *bt_ctf_event_class_create(const char *name)
        BT_LOGD("Creating event class object: name=\"%s\"",
                name);
 
-       if (bt_ctf_validate_identifier(name)) {
-               BT_LOGW("Invalid parameter: event class's name is not a valid CTF identifier: "
-                       "name=\"%s\"", name);
-               goto error;
-       }
-
        event_class = g_new0(struct bt_ctf_event_class, 1);
        if (!event_class) {
                BT_LOGE_STR("Failed to allocate one event class.");
index 52be6fcda02e4eb7c12a6192b7a31ed98b2fe621..9b1675608e37da016117e9c9988515ab3c248923 100644 (file)
@@ -97,12 +97,6 @@ struct bt_ctf_stream_class *bt_ctf_stream_class_create_empty(const char *name)
 
        BT_LOGD("Creating empty stream class object: name=\"%s\"", name);
 
-       if (name && bt_ctf_validate_identifier(name)) {
-               BT_LOGW("Invalid parameter: stream class's name is not a valid CTF identifier: "
-                       "name=\"%s\"", name);
-               goto error;
-       }
-
        stream_class = g_new0(struct bt_ctf_stream_class, 1);
        if (!stream_class) {
                BT_LOGE_STR("Failed to allocate one stream class.");
This page took 0.028996 seconds and 4 git commands to generate.