Fix: Unchecked session pointer when destroying a connection in relayd

An unknown command currently crashes the relay daemon since
destroy_connection calls destroy_session without checking whether or not
a session is associated with the connection.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
session_find_by_name does not need a non-const name param

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: tcp4 and net4 protocol support in uri_parse

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Send filter expression string to session daemon

Send the filter expression string along with the filter's bytecode to
the session daemon. The session daemon now stores the filter expression.
This makes it possible to list the filter's expression when listing
events.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Add a dependency to libxml2

libxml2 2.7.6 is the oldest supported version.
This is the version distributed as part of RHEL 6.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Add a config_writer API based on libxml2

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Add session configuration XSD

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Add a save API to lttng-ctl

This adds multiple function calls to the lttng-ctl API with save.h and
save-internal.h files.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Add session configuration save feature to session daemon

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Add a save command based on the save API to the lttng client

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Add session configuration load capability to libconfig

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Add load command to the lttng client

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: Fail configuration if libxml2 is not found

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Fix: clang 'constant-out-of-range-compare' warning

This patch fixes two 'autological-constant-out-of-range-compare' clang
warnings caused by comparing enum type variables with -1.

It's possible that compilers optimize these two comparisons away.

Signed-off-by: Zifei Tong <zifeitong@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: handle signed return value for snprintf

Signed-off-by: David Goulet <dgoulet@efficios.com>