projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update version to 2.0-pre5
[lttng-tools.git]
/
ltt-sessiond
/
main.c
diff --git
a/ltt-sessiond/main.c
b/ltt-sessiond/main.c
index bba8aa64d4dfebcb4a3c35150969c72070af7fb2..3195e3c191160351fbade811d482cfaa6a7603c1 100644
(file)
--- a/
ltt-sessiond/main.c
+++ b/
ltt-sessiond/main.c
@@
-1113,7
+1113,7
@@
static int notify_kernel_pollfd(void)
/*
* Allocate a channel structure and fill it.
*/
/*
* Allocate a channel structure and fill it.
*/
-static struct lttng_channel *init_default_channel(
void
)
+static struct lttng_channel *init_default_channel(
char *name
)
{
struct lttng_channel *chan;
{
struct lttng_channel *chan;
@@
-1123,7
+1123,7
@@
static struct lttng_channel *init_default_channel(void)
goto error;
}
goto error;
}
- if (snprintf(chan->name, NAME_MAX,
DEFAULT_CHANNEL_NAME
) < 0) {
+ if (snprintf(chan->name, NAME_MAX,
"%s", name
) < 0) {
perror("snprintf defautl channel name");
return NULL;
}
perror("snprintf defautl channel name");
return NULL;
}
@@
-1318,7
+1318,8
@@
static int process_client_msg(struct command_ctx *cmd_ctx)
if (no_event) {
ret = kernel_add_channel_context(chan, &ctx);
if (ret < 0) {
if (no_event) {
ret = kernel_add_channel_context(chan, &ctx);
if (ret < 0) {
- continue;
+ ret = LTTCOMM_KERN_CONTEXT_FAIL;
+ goto error;
}
} else {
event = get_kernel_event_by_name(cmd_ctx->lsm->u.context.event_name, chan);
}
} else {
event = get_kernel_event_by_name(cmd_ctx->lsm->u.context.event_name, chan);
@@
-1526,9
+1527,9
@@
static int process_client_msg(struct command_ctx *cmd_ctx)
kchan = get_kernel_channel_by_name(channel_name,
cmd_ctx->session->kernel_session);
if (kchan == NULL) {
kchan = get_kernel_channel_by_name(channel_name,
cmd_ctx->session->kernel_session);
if (kchan == NULL) {
- DBG("C
reating default channel"
);
+ DBG("C
hannel not found. Creating channel %s", channel_name
);
- chan = init_default_channel();
+ chan = init_default_channel(
channel_name
);
if (chan == NULL) {
ret = LTTCOMM_FATAL;
goto error;
if (chan == NULL) {
ret = LTTCOMM_FATAL;
goto error;
@@
-1590,9
+1591,9
@@
static int process_client_msg(struct command_ctx *cmd_ctx)
kchan = get_kernel_channel_by_name(channel_name,
cmd_ctx->session->kernel_session);
if (kchan == NULL) {
kchan = get_kernel_channel_by_name(channel_name,
cmd_ctx->session->kernel_session);
if (kchan == NULL) {
- DBG("C
reating default channel"
);
+ DBG("C
hannel not found. Creating channel %s", channel_name
);
- chan = init_default_channel();
+ chan = init_default_channel(
channel_name
);
if (chan == NULL) {
ret = LTTCOMM_FATAL;
goto error;
if (chan == NULL) {
ret = LTTCOMM_FATAL;
goto error;
This page took
0.024707 seconds
and
4
git commands to generate.