projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: bad logical check of error codes
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
ust-metadata.c
diff --git
a/src/bin/lttng-sessiond/ust-metadata.c
b/src/bin/lttng-sessiond/ust-metadata.c
index f8871ecaad1f460e803d9862b891acd9df937aa9..b0f83d2721654b0351c872f082997bef2b0dc881 100644
(file)
--- a/
src/bin/lttng-sessiond/ust-metadata.c
+++ b/
src/bin/lttng-sessiond/ust-metadata.c
@@
-372,6
+372,7
@@
int ust_metadata_event_statedump(struct ust_registry_session *session,
"};\n\n");
if (ret)
goto end;
"};\n\n");
if (ret)
goto end;
+ event->metadata_dumped = 1;
end:
return ret;
end:
return ret;
@@
-424,6
+425,8
@@
int ust_metadata_channel_statedump(struct ust_registry_session *session,
ret = lttng_metadata_printf(session,
"};\n\n");
ret = lttng_metadata_printf(session,
"};\n\n");
+ /* Flag success of metadata dump. */
+ chan->metadata_dumped = 1;
end:
return ret;
end:
return ret;
@@
-517,7
+520,9
@@
uint64_t measure_clock_offset(void)
* Should be called with session registry mutex held.
*/
int ust_metadata_session_statedump(struct ust_registry_session *session,
* Should be called with session registry mutex held.
*/
int ust_metadata_session_statedump(struct ust_registry_session *session,
- struct ust_app *app)
+ struct ust_app *app,
+ uint32_t major,
+ uint32_t minor)
{
unsigned char *uuid_c;
char uuid_s[UUID_STR_LEN],
{
unsigned char *uuid_c;
char uuid_s[UUID_STR_LEN],
@@
-525,6
+530,8
@@
int ust_metadata_session_statedump(struct ust_registry_session *session,
int ret = 0;
char hostname[HOST_NAME_MAX];
int ret = 0;
char hostname[HOST_NAME_MAX];
+ assert(session);
+
uuid_c = session->uuid;
snprintf(uuid_s, sizeof(uuid_s),
uuid_c = session->uuid;
snprintf(uuid_s, sizeof(uuid_s),
@@
-579,13
+586,10
@@
int ust_metadata_session_statedump(struct ust_registry_session *session,
" domain = \"ust\";\n"
" tracer_name = \"lttng-ust\";\n"
" tracer_major = %u;\n"
" domain = \"ust\";\n"
" tracer_name = \"lttng-ust\";\n"
" tracer_major = %u;\n"
- " tracer_minor = %u;\n"
- " tracer_patchlevel = %u;\n"
- "};\n\n",
+ " tracer_minor = %u;\n",
hostname,
hostname,
- app->version.major,
- app->version.minor,
- app->version.patchlevel
+ major,
+ minor
);
if (ret)
goto end;
);
if (ret)
goto end;
@@
-596,9
+600,10
@@
int ust_metadata_session_statedump(struct ust_registry_session *session,
*/
if (app) {
ret = lttng_metadata_printf(session,
*/
if (app) {
ret = lttng_metadata_printf(session,
+ " tracer_patchlevel = %u;\n"
" vpid = %d;\n"
" vpid = %d;\n"
- " procname = \"%s\";\n"
-
"};\n\n"
,
+ " procname = \"%s\";\n"
,
+
app->version.patchlevel
,
(int) app->pid,
app->name
);
(int) app->pid,
app->name
);
This page took
0.025574 seconds
and
5
git commands to generate.