From: Jonathan Rajotte Date: Thu, 23 Jun 2016 21:12:28 +0000 (-0400) Subject: Temporary mesure: disable xsd validation config_document_get X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=commitdiff_plain;h=d26b6a9085f01d3d1aa0f59006bde3787244f7f2 Temporary mesure: disable xsd validation config_document_get --- diff --git a/src/bin/lttng/commands/create.c b/src/bin/lttng/commands/create.c index 75edd2bee..b3a1e92ee 100644 --- a/src/bin/lttng/commands/create.c +++ b/src/bin/lttng/commands/create.c @@ -990,7 +990,7 @@ static int create_session(void) /* 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; diff --git a/src/common/config/session-config.c b/src/common/config/session-config.c index fc164fb1d..f8d92128f 100644 --- a/src/common/config/session-config.c +++ b/src/common/config/session-config.c @@ -3190,7 +3190,7 @@ void __attribute__((destructor)) session_config_exit(void) } 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; @@ -3247,8 +3247,12 @@ struct config_document *config_document_get(const char *path) 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; diff --git a/src/common/config/session-config.h b/src/common/config/session-config.h index c29d40af4..b441f4a33 100644 --- a/src/common/config/session-config.h +++ b/src/common/config/session-config.h @@ -294,7 +294,7 @@ int config_load_configuration_sessions(struct config_document *document, * 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.