summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
3050aa9)
Reuse the registration time for path generation.
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
static void shadow_copy_session(struct ust_app_session *ua_sess,
struct ltt_ust_session *usess, struct ust_app *app)
{
static void shadow_copy_session(struct ust_app_session *ua_sess,
struct ltt_ust_session *usess, struct ust_app *app)
{
struct tm *timeinfo;
char datetime[16];
int ret;
char tmp_shm_path[PATH_MAX];
struct tm *timeinfo;
char datetime[16];
int ret;
char tmp_shm_path[PATH_MAX];
- /* Get date and time for unique app path */
- time(&rawtime);
- timeinfo = localtime(&rawtime);
+ timeinfo = localtime(&app->registration_time);
strftime(datetime, sizeof(datetime), "%Y%m%d-%H%M%S", timeinfo);
DBG2("Shadow copy of session handle %d", ua_sess->handle);
strftime(datetime, sizeof(datetime), "%Y%m%d-%H%M%S", timeinfo);
DBG2("Shadow copy of session handle %d", ua_sess->handle);
assert(app);
assert(app->notify_sock >= 0);
assert(app);
assert(app->notify_sock >= 0);
+ app->registration_time = time(NULL);
+
* to a negative value indicating that the agent application is gone.
*/
int agent_app_sock;
* to a negative value indicating that the agent application is gone.
*/
int agent_app_sock;
+ /*
+ * Time at which the app is registred.
+ * Used for path creation
+ */
+ time_t registration_time;
};
#ifdef HAVE_LIBLTTNG_UST_CTL
};
#ifdef HAVE_LIBLTTNG_UST_CTL