Fix: send disable ALL command code if event is *

$ lttng disable-event -a
and
$ lttng disable-event '*'

Both commands should do the same meaning send the DISABLE_EVENT_ALL
command to the session daemon.

Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: disable event for JUL domain

This fix could not be backported from master since it has changed too
much but the ref. is 0dcfcf94b356c12e3936fa27f350896d96724e4e on the
master branch.

This fixes the disable event command that was not working with the JUL
domain and adds a test for it.

Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: bad handling of incoming data in consumer thread

This will fix Coverity issue 1019892.

The issue uncovered a more serious problem. The loop on ready FDs of the
thread was exiting at each branch thus not going on all fd. This is
problematic when the thread quit pipe is triggered and when there is
also at the same time a request for metadata from the consumer since the
metadata request could have been ignored.

This patch makes sure we go through all FDs in the loop when the thread
quit pipe or the metadata fd is triggered.

Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: incorrect cast in ust consumer assert

Fixes Coverity issue 1068813.

Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: check for kernel session metadata during init

Fixes Coverity issue 1040159.

Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: channel deref. after NULL check in kernel consumer

Fixes Coverity issue 1040158.

Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: handle sysconf possible negative returned value

Fixes Coverity issue 1019947.

Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: UST consumer sync all available metadata

In live mode, the sync metadata function was only working on one single
metadata stream of a given session ID. However, we can have multiple
metadata stream for the same session ID thus failing to send the data in
live mode correctly for the other streams.

This fixes it by simply iterating over all metadata stream for a session
ID and syncing them all.

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