/* Application's interrupter (owned by this) */
static bt_interrupter *the_interrupter;
-static volatile bool interrupted = false;
#ifdef __MINGW32__
bt_interrupter_set(the_interrupter);
}
- interrupted = true;
return TRUE;
}
if (the_interrupter) {
bt_interrupter_set(the_interrupter);
}
-
- interrupted = true;
}
static
bt_query_executor_add_interrupter(query_exec, the_interrupter);
- if (interrupted) {
- BT_CLI_LOGW_APPEND_CAUSE(
- "Interrupted by user before executing the query: "
- "comp-cls-addr=%p, comp-cls-name=\"%s\", "
- "query-obj=\"%s\"", comp_cls,
- bt_component_class_get_name(comp_cls), obj);
- *fail_reason = "interrupted by user";
- goto error;
- }
-
while (true) {
query_status = bt_query_executor_query(
query_exec, comp_cls, obj, params,
}
goto error;
- case BT_QUERY_EXECUTOR_QUERY_STATUS_INVALID_OBJECT:
- *fail_reason = "invalid or unknown query object";
- goto error;
- case BT_QUERY_EXECUTOR_QUERY_STATUS_INVALID_PARAMS:
- *fail_reason = "invalid query parameters";
+ case BT_QUERY_EXECUTOR_QUERY_STATUS_UNKNOWN_OBJECT:
+ *fail_reason = "unknown query object";
goto error;
case BT_QUERY_EXECUTOR_QUERY_STATUS_MEMORY_ERROR:
*fail_reason = "not enough memory";
const bt_component_class *comp_cls =
bt_component_class_source_as_component_class_const(src_comp_cls);
- ret = query(ctx->cfg, comp_cls, "trace-info",
+ ret = query(ctx->cfg, comp_cls, "babeltrace.trace-info",
cfg_comp->params, &query_result,
&fail_reason);
if (ret) {
- BT_LOGD("Component class does not support the `trace-info` query: %s: "
+ BT_LOGD("Component class does not support the `babeltrace.trace-info` query: %s: "
"comp-class-name=\"%s\"", fail_reason,
bt_component_class_get_name(comp_cls));
ret = -1;
BT_ASSERT(query_result);
if (!bt_value_is_array(query_result)) {
- BT_LOGD("Unexpected format of \'trace-info\' query result: "
+ BT_LOGD("Unexpected format of `babeltrace.trace-info` query result: "
"component-class-name=%s",
bt_component_class_get_name(comp_cls));
ret = -1;
goto error;
}
- if (interrupted) {
+ if (bt_interrupter_is_set(the_interrupter)) {
BT_CLI_LOGW_APPEND_CAUSE(
"Interrupted by user before creating components.");
goto error;
goto error;
}
- if (interrupted) {
+ if (bt_interrupter_is_set(the_interrupter)) {
BT_CLI_LOGW_APPEND_CAUSE(
"Interrupted by user before connecting components.");
goto error;
goto error;
}
- if (interrupted) {
- BT_CLI_LOGW_APPEND_CAUSE(
- "Interrupted by user before running the graph.");
- goto error;
- }
-
BT_LOGI_STR("Running the graph.");
/* Run the graph */