Cleanup: misleading create_ust_app_session() name
[lttng-tools.git] / src / bin / lttng-sessiond / ust-app.c
index 6828660aa537a22e73a23a73c4c38665af03f2fc..8120b6df21188ea88331bba2a7c27c883d9b410d 100644 (file)
@@ -2154,7 +2154,7 @@ error:
  * Returns 0 on success or else a negative code which is either -ENOMEM or
  * -ENOTCONN which is the default code if the ustctl_create_session fails.
  */
-static int create_ust_app_session(struct ltt_ust_session *usess,
+static int find_or_create_ust_app_session(struct ltt_ust_session *usess,
                struct ust_app *app, struct ust_app_session **ua_sess_ptr,
                int *is_created)
 {
@@ -4165,7 +4165,7 @@ int ust_app_create_channel_glb(struct ltt_ust_session *usess,
                 * that if session exist, it will simply return a pointer to the ust
                 * app session.
                 */
-               ret = create_ust_app_session(usess, app, &ua_sess, &created);
+               ret = find_or_create_ust_app_session(usess, app, &ua_sess, &created);
                if (ret < 0) {
                        switch (ret) {
                        case -ENOTCONN:
@@ -5041,7 +5041,7 @@ void ust_app_global_create(struct ltt_ust_session *usess, struct ust_app *app)
        struct ust_app_ctx *ua_ctx;
        int is_created = 0;
 
-       ret = create_ust_app_session(usess, app, &ua_sess, &is_created);
+       ret = find_or_create_ust_app_session(usess, app, &ua_sess, &is_created);
        if (ret < 0) {
                /* Tracer is probably gone or ENOMEM. */
                goto error;
@@ -6365,7 +6365,7 @@ int ust_app_rotate_session(struct ltt_session *session, bool *ust_active)
                                                usess->uid, usess->gid,
                                                usess->consumer, pathname,
                                                /* is_metadata_channel */ false,
-                                               session->rotate_count,
+                                               session->current_archive_id,
                                                &session->rotate_pending_relay);
                                if (ret < 0) {
                                        goto error;
@@ -6379,7 +6379,7 @@ int ust_app_rotate_session(struct ltt_session *session, bool *ust_active)
                                        usess->uid, usess->gid,
                                        usess->consumer, pathname,
                                        /* is_metadata_channel */ true,
-                                       session->rotate_count,
+                                       session->current_archive_id,
                                        &session->rotate_pending_relay);
                        if (ret < 0) {
                                goto error;
@@ -6456,7 +6456,7 @@ int ust_app_rotate_session(struct ltt_session *session, bool *ust_active)
                                                ua_sess->euid, ua_sess->egid,
                                                ua_sess->consumer, pathname,
                                                /* is_metadata_channel */ false,
-                                               session->rotate_count,
+                                               session->current_archive_id,
                                                &session->rotate_pending_relay);
                                if (ret < 0) {
                                        goto error;
@@ -6469,7 +6469,7 @@ int ust_app_rotate_session(struct ltt_session *session, bool *ust_active)
                                        ua_sess->euid, ua_sess->egid,
                                        ua_sess->consumer, pathname,
                                        /* is_metadata_channel */ true,
-                                       session->rotate_count,
+                                       session->current_archive_id,
                                        &session->rotate_pending_relay);
                        if (ret < 0) {
                                goto error;
This page took 0.025611 seconds and 5 git commands to generate.