Add support for shorten session uuid
[lttng-tools.git] / liblttngctl / liblttngctl.c
index bd02a13b2c451fad17d6b0612472bba7b5652023..adff646e175b50d1847c8ee6d4e6f9a5b68e2276 100644 (file)
@@ -24,7 +24,7 @@
 #include <string.h>
 #include <unistd.h>
 
-#include <lttng/liblttngctl.h>
+#include <lttng/lttng.h>
 
 #include "liblttsessiondcomm.h"
 #include "lttngerr.h"
@@ -111,6 +111,11 @@ static int ask_sessiond(enum lttcomm_command_type lct, void **buf)
        size_t size;
        void *data = NULL;
 
+       ret = lttng_connect_sessiond();
+       if (ret < 0) {
+               goto end;
+       }
+
        lsm.cmd_type = lct;
 
        /* Send command to session daemon */
@@ -148,7 +153,7 @@ static int ask_sessiond(enum lttcomm_command_type lct, void **buf)
        ret = size;
 
 end:
-       /* Reset lsm data struct */
+       lttng_disconnect_sessiond();
        memset(&lsm, 0, sizeof(lsm));
        return ret;
 }
This page took 0.024351 seconds and 4 git commands to generate.