projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Send ust and kernel domain directory handle to consumer
[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 ed68d153f20749630012c93a4487f6dad6efec96..ee71533f9ff790e60e11fac522ac2c82c2f4e3c6 100644
(file)
--- a/
src/bin/lttng-sessiond/session.c
+++ b/
src/bin/lttng-sessiond/session.c
@@
-302,7
+302,7
@@
end:
*
* The session list lock must be held.
*/
*
* The session list lock must be held.
*/
-int ltt_sessions_ht_alloc(void)
+
static
int ltt_sessions_ht_alloc(void)
{
int ret = 0;
{
int ret = 0;
@@
-491,7
+491,8
@@
int _session_set_trace_chunk_no_lock_check(struct ltt_session *session,
pthread_mutex_lock(socket->lock);
ret = consumer_create_trace_chunk(socket,
relayd_id,
pthread_mutex_lock(socket->lock);
ret = consumer_create_trace_chunk(socket,
relayd_id,
- session->id, new_trace_chunk);
+ session->id, new_trace_chunk,
+ DEFAULT_UST_TRACE_DIR);
pthread_mutex_unlock(socket->lock);
if (ret) {
goto error;
pthread_mutex_unlock(socket->lock);
if (ret) {
goto error;
@@
-521,7
+522,8
@@
int _session_set_trace_chunk_no_lock_check(struct ltt_session *session,
pthread_mutex_lock(socket->lock);
ret = consumer_create_trace_chunk(socket,
relayd_id,
pthread_mutex_lock(socket->lock);
ret = consumer_create_trace_chunk(socket,
relayd_id,
- session->id, new_trace_chunk);
+ session->id, new_trace_chunk,
+ DEFAULT_KERNEL_TRACE_DIR);
pthread_mutex_unlock(socket->lock);
if (ret) {
goto error;
pthread_mutex_unlock(socket->lock);
if (ret) {
goto error;
@@
-575,7
+577,7
@@
struct lttng_trace_chunk *session_create_new_trace_chunk(
const time_t chunk_creation_ts = time(NULL);
bool is_local_trace;
const char *base_path;
const time_t chunk_creation_ts = time(NULL);
bool is_local_trace;
const char *base_path;
- struct lttng_directory_handle
session_output_directory
;
+ struct lttng_directory_handle
*session_output_directory = NULL
;
const struct lttng_credentials session_credentials = {
.uid = session->uid,
.gid = session->gid,
const struct lttng_credentials session_credentials = {
.uid = session->uid,
.gid = session->gid,
@@
-640,20
+642,21
@@
struct lttng_trace_chunk *session_create_new_trace_chunk(
if (ret) {
goto error;
}
if (ret) {
goto error;
}
- ret = lttng_directory_handle_init(&session_output_directory,
- base_path);
- if (ret) {
+ session_output_directory = lttng_directory_handle_create(base_path);
+ if (!session_output_directory) {
goto error;
}
chunk_status = lttng_trace_chunk_set_as_owner(trace_chunk,
goto error;
}
chunk_status = lttng_trace_chunk_set_as_owner(trace_chunk,
- &session_output_directory);
- lttng_directory_handle_fini(&session_output_directory);
+ session_output_directory);
+ lttng_directory_handle_put(session_output_directory);
+ session_output_directory = NULL;
if (chunk_status != LTTNG_TRACE_CHUNK_STATUS_OK) {
goto error;
}
end:
return trace_chunk;
error:
if (chunk_status != LTTNG_TRACE_CHUNK_STATUS_OK) {
goto error;
}
end:
return trace_chunk;
error:
+ lttng_directory_handle_put(session_output_directory);
lttng_trace_chunk_put(trace_chunk);
trace_chunk = NULL;
goto end;
lttng_trace_chunk_put(trace_chunk);
trace_chunk = NULL;
goto end;
This page took
0.026223 seconds
and
5
git commands to generate.