+/*
+ * 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;
+}
+