static void shadow_copy_session(struct ust_app_session *ua_sess,
struct ltt_ust_session *usess, struct ust_app *app)
{
- time_t rawtime;
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);
assert(app);
assert(app->notify_sock >= 0);
+ app->registration_time = time(NULL);
+
rcu_read_lock();
/*
* 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