X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=ltt-sessiond%2Fkernel-ctl.c;h=34dc6562c5168af7c6dd07ac91e3f8f1f0245274;hb=38057ed1e3358090cd03b81ce8414b032eb56f43;hp=ea3c8b2835f0e0c3b8fa3ab91df78914a35553a7;hpb=58a97671d5fa65f93126798ded9e5306e3555186;p=lttng-tools.git diff --git a/ltt-sessiond/kernel-ctl.c b/ltt-sessiond/kernel-ctl.c index ea3c8b283..34dc6562c 100644 --- a/ltt-sessiond/kernel-ctl.c +++ b/ltt-sessiond/kernel-ctl.c @@ -25,7 +25,6 @@ #include #include "lttngerr.h" -#include "ltt-sessiond.h" #include "libkernelctl.h" #include "kernel-ctl.h" @@ -125,7 +124,6 @@ int kernel_create_session(struct ltt_session *session, int tracer_fd) lks->kconsumer_fds_sent = 0; session->kernel_session = lks; - session->kern_session_count++; DBG("Kernel session created (fd: %d)", lks->fd); @@ -283,6 +281,9 @@ int kernel_enable_event(struct ltt_kernel_event *event) ret = kernctl_enable(event->fd); if (ret < 0) { perror("enable event ioctl"); + if (errno == EEXIST) { + ret = -EEXIST; + } goto error; }