/* Restriction on flags exist when using template */
/* Session type flags are not permitted */
/* --live & --snapshot */
- template = config_document_get(opt_template_path);
+ template = config_document_get(opt_template_path, 1);
if (!template) {
ERR("Template could not be parsed");
ret = CMD_ERROR;
}
LTTNG_HIDDEN
-struct config_document *config_document_get(const char *path)
+struct config_document *config_document_get(const char *path, int xsd_validation)
{
int ret;
struct config_document *document = NULL;
goto error;
}
- ret = xmlSchemaValidateDoc(validation_ctx.schema_validation_ctx,
- document->document);
+ /* TODO: REMOVE */
+ ret = 0;
+ if (xsd_validation) {
+ ret = xmlSchemaValidateDoc(validation_ctx.schema_validation_ctx,
+ document->document);
+ }
if (ret) {
ERR("Session configuration file validation failed");
goto error;
* The caller is responsible of freeing the document via config_document_free.
*/
LTTNG_HIDDEN
-struct config_document *config_document_get(const char *path);
+struct config_document *config_document_get(const char *path, int xsd_validation);
/*
* Free an allocated document.