Merge remote-tracking branch 'cbab-github/tests-cleanup' into cbab
[lttng-tools.git] / src / lib / lttng-ctl / lttng-ctl.c
index 3e532ad60067c6db4a454eb2d4d6b3ab890a6d7e..8f63bf3e85e367285f9c599176040a4cd266dcd5 100644 (file)
@@ -636,9 +636,7 @@ end:
  */
 void lttng_destroy_handle(struct lttng_handle *handle)
 {
-       if (handle) {
-               free(handle);
-       }
+       free(handle);
 }
 
 /*
@@ -1457,47 +1455,19 @@ int lttng_set_consumer_url(struct lttng_handle *handle,
 }
 
 /*
- * Enable consumer for a session and domain.
- *
- * Return 0 on success, else a negative value.
+ * [OBSELETE]
  */
 int lttng_enable_consumer(struct lttng_handle *handle)
 {
-       struct lttcomm_session_msg lsm;
-
-       if (handle == NULL) {
-               return -LTTNG_ERR_INVALID;
-       }
-
-       lsm.cmd_type = LTTNG_ENABLE_CONSUMER;
-
-       copy_string(lsm.session.name, handle->session_name,
-                       sizeof(lsm.session.name));
-       copy_lttng_domain(&lsm.domain, &handle->domain);
-
-       return ask_sessiond(&lsm, NULL);
+       return -ENOSYS;
 }
 
 /*
- * Disable consumer for a session and domain.
- *
- * Return 0 on success, else a negative value.
+ * [OBSELETE]
  */
 int lttng_disable_consumer(struct lttng_handle *handle)
 {
-       struct lttcomm_session_msg lsm;
-
-       if (handle == NULL) {
-               return -LTTNG_ERR_INVALID;
-       }
-
-       lsm.cmd_type = LTTNG_DISABLE_CONSUMER;
-
-       copy_string(lsm.session.name, handle->session_name,
-                       sizeof(lsm.session.name));
-       copy_lttng_domain(&lsm.domain, &handle->domain);
-
-       return ask_sessiond(&lsm, NULL);
+       return -ENOSYS;
 }
 
 /*
@@ -1619,7 +1589,7 @@ int _lttng_create_session_ext(const char *name, const char *url,
        struct lttcomm_session_msg lsm;
        struct lttng_uri *uris = NULL;
 
-       if (name == NULL || datetime == NULL) {
+       if (name == NULL || datetime == NULL || url == NULL) {
                return -LTTNG_ERR_INVALID;
        }
 
This page took 0.023237 seconds and 4 git commands to generate.