When a kernel session is created, a consumer is immediately spawned. So,
using two sessions, the second one was not able to register it's own
consumer since the consumer_fd is set because there is a running kernel
consumer from the first created session. The flag consumer_fds_sent is
now used to test if the kernel consumer is already consuming buffers.
Reported-by: Julien Desfossez <julien.desfossez@polymtl.ca>
Signed-off-by: David Goulet <david.goulet@polymtl.ca>
switch (domain) {
case LTTNG_DOMAIN_KERNEL:
/* Can't register a consumer if there is already one */
- if (session->kernel_session->consumer_fd != 0) {
+ if (session->kernel_session->consumer_fds_sent != 0) {
ret = LTTCOMM_KERN_CONSUMER_FAIL;
goto error;
}