projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: honor base path for network URIs
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
session.c
diff --git
a/src/bin/lttng-sessiond/session.c
b/src/bin/lttng-sessiond/session.c
index 514b11e9919da0c2814aa99096c4bcd99862d892..2a7b8b83bb8d643ecdfcfdbd3c1364e69b562b10 100644
(file)
--- a/
src/bin/lttng-sessiond/session.c
+++ b/
src/bin/lttng-sessiond/session.c
@@
-851,6
+851,7
@@
void session_release(struct urcu_ref *ref)
}
lttng_dynamic_array_reset(&session->destroy_notifiers);
free(session->last_archived_chunk_name);
}
lttng_dynamic_array_reset(&session->destroy_notifiers);
free(session->last_archived_chunk_name);
+ free(session->base_path);
free(session);
if (session_published) {
/*
free(session);
if (session_published) {
/*
@@
-981,7
+982,7
@@
end:
* Session list lock must be held by the caller.
*/
enum lttng_error_code session_create(const char *name, uid_t uid, gid_t gid,
* Session list lock must be held by the caller.
*/
enum lttng_error_code session_create(const char *name, uid_t uid, gid_t gid,
- struct ltt_session **out_session)
+
const char *base_path,
struct ltt_session **out_session)
{
int ret;
enum lttng_error_code ret_code;
{
int ret;
enum lttng_error_code ret_code;
@@
-1104,6
+1105,16
@@
enum lttng_error_code session_create(const char *name, uid_t uid, gid_t gid,
}
}
}
}
+ if (base_path) {
+ new_session->base_path = strdup(base_path);
+ if (!new_session->base_path) {
+ ERR("Failed to allocate base path of session \"%s\"",
+ name);
+ ret_code = LTTNG_ERR_SESSION_FAIL;
+ goto error;
+ }
+ }
+
new_session->uid = uid;
new_session->gid = gid;
new_session->uid = uid;
new_session->gid = gid;
This page took
0.023187 seconds
and
4
git commands to generate.