*/
void lttng_destroy_handle(struct lttng_handle *handle)
{
- if (handle) {
- free(handle);
- }
+ free(handle);
}
/*
attr->subbuf_size = default_get_kernel_channel_subbuf_size();
attr->num_subbuf = DEFAULT_KERNEL_CHANNEL_SUBBUF_NUM;
attr->output = DEFAULT_KERNEL_CHANNEL_OUTPUT;
+ attr->tracefile_size = DEFAULT_KERNEL_CHANNEL_TRACEFILE_SIZE;
+ attr->tracefile_count = DEFAULT_KERNEL_CHANNEL_TRACEFILE_COUNT;
break;
case LTTNG_DOMAIN_UST:
#if 0
attr->subbuf_size = default_get_ust_channel_subbuf_size();
attr->num_subbuf = DEFAULT_UST_CHANNEL_SUBBUF_NUM;
attr->output = DEFAULT_UST_CHANNEL_OUTPUT;
+ attr->tracefile_size = DEFAULT_UST_CHANNEL_TRACEFILE_SIZE;
+ attr->tracefile_count = DEFAULT_UST_CHANNEL_TRACEFILE_COUNT;
break;
default:
/* Default behavior: leave set to 0. */
}
/*
- * 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;
}