From: Mathieu Desnoyers Date: Fri, 9 Jun 2017 21:41:53 +0000 (-0400) Subject: Fix: event, stream names can be strings X-Git-Tag: v2.0.0-pre1~11 X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=1530e4060d7afb862a2c1df2436e3104fbf1279d Fix: event, stream names can be strings 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 Signed-off-by: Jérémie Galarneau --- diff --git a/lib/ctf-ir/event-class.c b/lib/ctf-ir/event-class.c index 9f82e176..67cb1575 100644 --- a/lib/ctf-ir/event-class.c +++ b/lib/ctf-ir/event-class.c @@ -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."); diff --git a/lib/ctf-ir/stream-class.c b/lib/ctf-ir/stream-class.c index 52be6fcd..9b167560 100644 --- a/lib/ctf-ir/stream-class.c +++ b/lib/ctf-ir/stream-class.c @@ -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.");