Fix: don't delete stream from connection recv list

We don't need to delete them from the list during a connection destroy
because it's only a reference to the stream that might be valid or not
during the connection destroy. There is no need at all to access the
stream's pointer at that point.

Commit cd2ef1ef1d54ced9e4d0d03b865bb7fc6a905f80 did not fixed the full
issue so this should fix the use after free race for good.

Signed-off-by: David Goulet <dgoulet@efficios.com>
Update ChangeLog with 2.4.1 release

Signed-off-by: David Goulet <dgoulet@efficios.com>
Insert V4L2 instrumentation module on session start

Requires V4L2 instrumentation patch for lttng-modules.

Signed-off-by: Wade Farnsworth <wade_farnsworth@mentor.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Add MIT license header to session.xsd

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: XML declaration must be at beginning of XSD file

Move down license information to fix the parser error :
XML declaration allowed only at the start of the document

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: rework utils_parse_size_suffix

Ok, so there are a lot of problems with this function (sorry :|). Taking
the regex road is probably to complicated for nothing, so here is a
version without regexes.

I added many test cases as suggested by Sandeep Chaudhary and Daniel
Thibault. I tested on both Intel 32 and 64 bits.

Fixes #633

Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: replace 1 for true in libxml checking

Initial bug on ./configure:
checking for libxml - version >= 2.7.6... yes (version 2.9.1)
./configure: line 5137: 1: command not found

Signed-off-by: Jonathan Rajotte <jonathan.r.julien@gmail.com>
Override the session.xsd path with an ENV. variable

The LTTNG_SESSION_CONFIG_XSD_PATH environment variable can be used to
specify a path which contains the session configuration schema. This
will allow save-load tests to be ran without installing the XSD on the
system.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Use the in-tree session.xsd in test_load

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Mi: mi backend + mi for command version

The machine interface option is now available for version.
Other commands will shortly follow.
Mi backend is expected to grow with addition of mi support
to other commands.

How to use:
	lttng --mi <mi_output_type> <command>

This syntax will be the same for all commands.
Currently *only xml is supported as machine interface output.*

As for errors handling, if an error/warning occurs while using mi it will be
reported on stderr as normal. The integrity of the mi output cannot be
guaranteed if an error/warning occurs.
The error output format is consistent and easy for a machine client to parse.
Thus no mi output format is required for error output.

Example:
	lttng --mi xml version
Output:
<?xml version="1.0" encoding="UTF-8"?>
  <command>
    <name>version</name>
    <output>
      <string>2.4.0-rc2</string>
      <major>2</major>
      <minor>4</minor>
      <patchLevel>0</patchLevel>
      <name>Époque Opaque</name>
      <description>The Époque Opaque is a black IPA from Trou du Diable
      brewery. The nose is eerily reminiscent of the coffee crisp candy from
      of our childhood. These strong mocha accents are present on the palate,
      which are quickly subdued by Japanese and Australian hops leading to a
      final state of satisfaction enjoyable for any fan of bitter
      beer.</description>
      <url>http://lttng.org</url>
      <license>lttng is free software and under the GPL license and part
      LGPL</license>
  </output>
</command>
Mi: support for command list
Mi: xsd for validation of mi ouput

Support command version and list
Mi fix: comments about unclosed session
Mi patch 2 revert utility function

Comply with xsd+ namespacing
Mi patch 2 fix loglevel type
Mi patch 2 delete unecessery type
Patch 2 : move mi check into list_sessions

Keep cmd_list a lot more clean
Mi xsd: cp the mi_lttng xsd on installation
Add MIT license header to mi_lttng.xsd
Patch 2 merging function