Fix wrong pathname creation for UST metadata
authorDavid Goulet <david.goulet@polymtl.ca>
Tue, 8 Nov 2011 18:22:40 +0000 (13:22 -0500)
committerDavid Goulet <david.goulet@polymtl.ca>
Tue, 8 Nov 2011 18:22:40 +0000 (13:22 -0500)
Signed-off-by: David Goulet <david.goulet@polymtl.ca>
lttng-sessiond/ust-app.c

index 39bfaea1595698128df2807c9d0d34d21ef72cd7..b2c73ffed08894a3af0622d226491e060e5110fb 100644 (file)
@@ -758,8 +758,8 @@ int ust_app_start_trace(struct ltt_ust_session *usess)
                                goto next;
                        }
 
-                       ret = snprintf(ua_sess->metadata->pathname, PATH_MAX, "%s/%s",
-                                       ua_sess->metadata->pathname, "metadata");
+                       ret = snprintf(ua_sess->metadata->pathname, PATH_MAX, "%s/%s-%d/metadata",
+                                       usess->pathname, app->name, app->key.pid);
                        if (ret < 0) {
                                PERROR("asprintf UST create stream");
                                goto next;
@@ -956,8 +956,8 @@ void ust_app_global_update(struct ltt_ust_session *usess, int sock)
                        goto error;
                }
 
-               ret = snprintf(ua_sess->metadata->pathname, PATH_MAX, "%s/metadata",
-                               ua_sess->metadata->pathname);
+               ret = snprintf(ua_sess->metadata->pathname, PATH_MAX, "%s/%s-%d/metadata",
+                               usess->pathname, app->name, app->key.pid);
                if (ret < 0) {
                        PERROR("asprintf UST create stream");
                        goto error;
This page took 0.035782 seconds and 4 git commands to generate.