projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rename ltt_ust_stream to ust_app_stream
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
cmd.c
diff --git
a/src/bin/lttng-sessiond/cmd.c
b/src/bin/lttng-sessiond/cmd.c
index aaa5a8923332bb39ed3b43a8ecdc5688880206dd..ff418e17ee0df63f8a82518db844d500fd879bcb 100644
(file)
--- a/
src/bin/lttng-sessiond/cmd.c
+++ b/
src/bin/lttng-sessiond/cmd.c
@@
-558,7
+558,7
@@
static int send_consumer_relayd_socket(int domain, struct ltt_session *session,
/* Send relayd socket to consumer. */
ret = consumer_send_relayd_socket(consumer_sock, sock,
/* Send relayd socket to consumer. */
ret = consumer_send_relayd_socket(consumer_sock, sock,
- consumer, relayd_uri->stype);
+ consumer, relayd_uri->stype
, session->id
);
if (ret < 0) {
ret = LTTNG_ERR_ENABLE_CONSUMER_FAIL;
goto close_sock;
if (ret < 0) {
ret = LTTNG_ERR_ENABLE_CONSUMER_FAIL;
goto close_sock;
@@
-1111,7
+1111,7
@@
int cmd_enable_event(struct ltt_session *session, int domain,
char *channel_name, struct lttng_event *event,
struct lttng_filter_bytecode *filter, int wpipe)
{
char *channel_name, struct lttng_event *event,
struct lttng_filter_bytecode *filter, int wpipe)
{
- int ret;
+ int ret
, channel_created = 0
;
struct lttng_channel *attr;
assert(session);
struct lttng_channel *attr;
assert(session);
@@
-1139,6
+1139,8
@@
int cmd_enable_event(struct ltt_session *session, int domain,
goto error;
}
free(attr);
goto error;
}
free(attr);
+
+ channel_created = 1;
}
/* Get the newly created kernel channel pointer */
}
/* Get the newly created kernel channel pointer */
@@
-1153,6
+1155,10
@@
int cmd_enable_event(struct ltt_session *session, int domain,
ret = event_kernel_enable_tracepoint(session->kernel_session, kchan,
event);
if (ret != LTTNG_OK) {
ret = event_kernel_enable_tracepoint(session->kernel_session, kchan,
event);
if (ret != LTTNG_OK) {
+ if (channel_created) {
+ /* Let's not leak a useless channel. */
+ kernel_destroy_channel(kchan);
+ }
goto error;
}
goto error;
}
@@
-1283,6
+1289,10
@@
int cmd_enable_event_all(struct ltt_session *session, int domain,
/* Manage return value */
if (ret != LTTNG_OK) {
/* Manage return value */
if (ret != LTTNG_OK) {
+ /*
+ * On error, cmd_enable_channel call will take care of destroying
+ * the created channel if it was needed.
+ */
goto error;
}
goto error;
}
This page took
0.025763 seconds
and
5
git commands to generate.