Add close unix socket function to libcomm API
[lttng-tools.git] / liblttngctl / liblttngctl.c
index a15a26dff82f2e348cff63455829402ef780aa6d..7c5af7fe784e3169ed841e66413e6048e149f953 100644 (file)
@@ -280,6 +280,24 @@ int lttng_connect_sessiond(void)
        return 0;
 }
 
+/*
+ *  lttng_disconnect_sessiond
+ *
+ *  Clean disconnect the session daemon.
+ */
+int lttng_disconnect_sessiond(void)
+{
+       int ret = 0;
+
+       if (connected) {
+               ret = lttcomm_close_unix_sock(sessiond_socket);
+               sessiond_socket = 0;
+               connected = 0;
+       }
+
+       return ret;
+}
+
 /*
  *  lttng_set_current_session_uuid
  *
This page took 0.031022 seconds and 4 git commands to generate.