Temporary mesure: disable xsd validation config_document_get
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Thu, 23 Jun 2016 21:12:28 +0000 (17:12 -0400)
committerJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Mon, 11 Jul 2016 15:20:33 +0000 (11:20 -0400)
src/bin/lttng/commands/create.c
src/common/config/session-config.c
src/common/config/session-config.h

index 75edd2bee22db679925db1e88ecd382f7f6c4977..b3a1e92eeab925319773689f7f9fb1db77df8831 100644 (file)
@@ -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;
index fc164fb1dc7af94980c7f209cb3883b70206f28d..f8d92128f0e11435c8b8ffa10f7ca29b4321948e 100644 (file)
@@ -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;
index c29d40af46d0592155d31398d1eff601e00c67cd..b441f4a33021998202743f9317103a06ae1c5fe1 100644 (file)
@@ -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.
This page took 0.029926 seconds and 5 git commands to generate.