-static
-int create_session_net_output(const char *name, const char *control_uri,
- const char *data_uri)
-{
- int ret;
- struct lttng_handle *handle;
- const char *uri = NULL;
-
- LTTNG_ASSERT(name);
-
- handle = lttng_create_handle(name, NULL);
- if (!handle) {
- ret = -LTTNG_ERR_NOMEM;
- goto end;
- }
-
- if (!control_uri || !data_uri) {
- uri = control_uri ? control_uri : data_uri;
- control_uri = uri;
- data_uri = uri;
- }
-
- ret = lttng_set_consumer_url(handle, control_uri, data_uri);
- lttng_destroy_handle(handle);
-end:
- return ret;
-}
-