"};\n\n");
if (ret)
goto end;
+ event->metadata_dumped = 1;
end:
return ret;
ret = lttng_metadata_printf(session,
"};\n\n");
+ /* Flag success of metadata dump. */
+ chan->metadata_dumped = 1;
end:
return ret;
* 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],
int ret = 0;
char hostname[HOST_NAME_MAX];
+ assert(session);
+
uuid_c = session->uuid;
snprintf(uuid_s, sizeof(uuid_s),
" domain = \"ust\";\n"
" tracer_name = \"lttng-ust\";\n"
" tracer_major = %u;\n"
- " tracer_minor = %u;\n"
- " tracer_patchlevel = %u;\n",
+ " tracer_minor = %u;\n",
hostname,
- app->version.major,
- app->version.minor,
- app->version.patchlevel
+ major,
+ minor
);
if (ret)
goto end;
*/
if (app) {
ret = lttng_metadata_printf(session,
+ " tracer_patchlevel = %u;\n"
" vpid = %d;\n"
" procname = \"%s\";\n",
+ app->version.patchlevel,
(int) app->pid,
app->name
);