projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: don't create a channel on an enable channel
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
channel.c
diff --git
a/src/bin/lttng-sessiond/channel.c
b/src/bin/lttng-sessiond/channel.c
index 1621bc626bba7d72b52098b8c1798ee859d80c70..ff2db69db7389976c0c1dd3bd891cf5fbc969620 100644
(file)
--- a/
src/bin/lttng-sessiond/channel.c
+++ b/
src/bin/lttng-sessiond/channel.c
@@
-214,7
+214,7
@@
int channel_ust_enable(struct ltt_ust_session *usess,
* successfully created on the session daemon side so the enable-channel
* command is a success.
*/
* successfully created on the session daemon side so the enable-channel
* command is a success.
*/
- (void) ust_app_
creat
e_channel_glb(usess, uchan);
+ (void) ust_app_
enabl
e_channel_glb(usess, uchan);
uchan->enabled = 1;
DBG2("Channel %s enabled successfully", uchan->name);
uchan->enabled = 1;
DBG2("Channel %s enabled successfully", uchan->name);
@@
-282,8
+282,18
@@
int channel_ust_create(struct ltt_ust_session *usess,
goto error;
}
goto error;
}
+ /* Validate buffer type. */
+ switch (type) {
+ case LTTNG_BUFFER_PER_PID:
+ case LTTNG_BUFFER_PER_UID:
+ break;
+ default:
+ ret = LTTNG_ERR_BUFFER_NOT_SUPPORTED;
+ goto error;
+ }
+
/* Create UST channel */
/* Create UST channel */
- uchan = trace_ust_create_channel(attr
, usess->pathname
);
+ uchan = trace_ust_create_channel(attr);
if (uchan == NULL) {
ret = LTTNG_ERR_FATAL;
goto error;
if (uchan == NULL) {
ret = LTTNG_ERR_FATAL;
goto error;
This page took
0.024238 seconds
and
4
git commands to generate.