Install lttng/lttng-sessiond-comm.h into system
[lttng-tools.git] / ltt-sessiond / main.c
index d104830667dd6cf9efc040584a5c18c4293381c9..64493521ba77e6edf5df99d097683b930205a0ae 100644 (file)
@@ -41,9 +41,9 @@
 
 #include <urcu/list.h>         /* URCU list library (-lurcu) */
 #include <lttng/lttng.h>
+#include <lttng/lttng-sessiond-comm.h>
 
 #include "context.h"
-#include "liblttsessiondcomm.h"
 #include "ltt-sessiond.h"
 #include "lttngerr.h"
 #include "kernel-ctl.h"
@@ -119,9 +119,11 @@ static gid_t allowed_group(void)
 {
        struct group *grp;
 
-       grp = (opt_tracing_group != NULL) ?
-               (grp = getgrnam(opt_tracing_group)) :
-               (grp = getgrnam(default_tracing_group));
+       if (opt_tracing_group) {
+               grp = getgrnam(opt_tracing_group);
+       } else {
+               grp = getgrnam(default_tracing_group);
+       }
        if (!grp) {
                return -1;
        } else {
@@ -2060,7 +2062,7 @@ static int process_client_msg(struct command_ctx *cmd_ctx)
                        goto setup_error;
                }
 
-               DBG("Listing events (%ld events)", nb_event);
+               DBG("Listing events (%zu events)", nb_event);
 
                list_lttng_events(kchan,
                                (struct lttng_event *)(cmd_ctx->llm->payload));
@@ -2439,8 +2441,6 @@ end:
  */
 static int check_existing_daemon(void)
 {
-       int ret;
-
        if (access(client_unix_sock_path, F_OK) < 0 &&
            access(apps_unix_sock_path, F_OK) < 0)
                return 0;
@@ -2460,7 +2460,6 @@ static int check_existing_daemon(void)
 static int set_permissions(void)
 {
        int ret;
-       struct group *grp;
        gid_t gid;
 
        gid = allowed_group();
This page took 0.024992 seconds and 4 git commands to generate.