}
if (xpath_result_size == 0) {
- ret = -LTTNG_ERR_CONFIG_REPLACEMENT;
+ ret = -LTTNG_ERR_CONFIG_INVALID_COUNT;
goto end;
}
copy = xmlCopyNode(element->element, 1);
if (!copy) {
ret = -LTTNG_ERR_NOMEM;
- ERR("Copy failed for node replacement");
goto end;
}
local_copy = xmlCopyNode(element->element, 1);
if (!local_copy) {
ret = -LTTNG_ERR_NOMEM;
- ERR("Duplication of node to be insert failed");
goto end;
}
/* Add the child */
local_copy = xmlCopyNode(x_child, 1);
if (!local_copy) {
- ret = -1;
ERR("Duplication of node to be insert failed");
+ ret = -LTTNG_ERR_CONFIG_ADD_CHILD;
goto end;
}
x_ret = xmlAddChild(x_parent, local_copy);
if (!x_ret) {
xmlFreeNode(local_copy);
+ ret = -LTTNG_ERR_CONFIG_ADD_CHILD;
}
end:
return ret;
handle = lttng_create_handle(session_name, &domain);
if (!handle) {
- ERR("Handle creation");
- ret = 1;
+ ret = -LTTNG_ERR_HANDLE_CREATION;
goto error;
}
node = element->element;
/* Check if element is really and event */
if (xmlStrcmp(BAD_CAST config_element_event, node->name)) {
- ERR("Passed element is not an event");
- ret = 1;
+ ret = -LTTNG_ERR_CONFIG_INVALID_ELEMENT;
goto error;
}