*/
void lttng_destroy_handle(struct lttng_handle *handle)
{
- if (handle) {
- free(handle);
- }
+ free(handle);
}
/*
return ret;
}
- if (strlen(sessiond_sock_path) == 0) {
+ if (*sessiond_sock_path == '\0') {
/*
* No socket path set. Weird error which means the constructor was not
* called.
}
/*
- * 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;
}
/*
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;
}