https://bugs.lttng.org/issues/350
Fixes #350
Signed-off-by: David Goulet <dgoulet@efficios.com>
goto error;
}
- if (!session->start_consumer) {
- ret = LTTNG_ERR_NO_CONSUMER;
- goto error;
- }
-
/*
* This case switch makes sure the domain session has a temporary consumer
* so the URL can be set.
goto error;
}
- if (!session->start_consumer) {
- ret = LTTNG_ERR_NO_CONSUMER;
- goto error;
- }
-
switch (domain) {
case 0:
assert(session->consumer);
break;
}
+ session->start_consumer = 1;
+
/* Enable it */
if (consumer) {
consumer->enabled = 1;
lsm.u.uri.size = size;
- if (uris[0].dtype != LTTNG_DST_PATH && strlen(uris[0].subdir) == 0) {
+ if (size > 0 && uris[0].dtype != LTTNG_DST_PATH && strlen(uris[0].subdir) == 0) {
ret = snprintf(uris[0].subdir, sizeof(uris[0].subdir), "%s-%s", name,
datetime);
if (ret < 0) {