Clean-up: use const reference where possible
[lttng-tools.git] / src / bin / lttng-sessiond / cmd.cpp
index 413bb6500353ba6e72536e97513f66ef16e00cd8..79cb6fed89398e00833f2ea27620090eba09e81e 100644 (file)
@@ -3390,8 +3390,7 @@ error:
  *
  * Called with session lock held.
  */
-int cmd_destroy_session(struct ltt_session *session,
-                       int *sock_fd)
+int cmd_destroy_session(struct ltt_session *session, int *sock_fd)
 {
        int ret;
        enum lttng_error_code destruction_last_error = LTTNG_OK;
@@ -3436,7 +3435,7 @@ int cmd_destroy_session(struct ltt_session *session,
                try {
                        the_rotation_thread_handle->unsubscribe_session_consumed_size_rotation(
                                *session);
-               } catch (std::exception& e) {
+               } catch (const std::exception& e) {
                        /* Continue the destruction of the session anyway. */
                        ERR("Failed to unsubscribe rotation thread notification channel from consumed size condition during session destruction: %s",
                            e.what());
@@ -4469,6 +4468,8 @@ synchronize_tracer_notifier_register(struct notification_thread_handle *notifica
                                    (int) trigger_owner,
                                    ret_code);
                        }
+
+                       goto end_unlock_session_list;
                }
                break;
        }
@@ -5897,7 +5898,7 @@ int cmd_rotation_set_schedule(struct ltt_session *session,
                        try {
                                the_rotation_thread_handle->subscribe_session_consumed_size_rotation(
                                        *session, new_value);
-                       } catch (std::exception& e) {
+                       } catch (const std::exception& e) {
                                ERR("Failed to enable consumed-size notification in ROTATION_SET_SCHEDULE command: %s",
                                    e.what());
                                ret = LTTNG_ERR_UNK;
@@ -5907,7 +5908,7 @@ int cmd_rotation_set_schedule(struct ltt_session *session,
                        try {
                                the_rotation_thread_handle
                                        ->unsubscribe_session_consumed_size_rotation(*session);
-                       } catch (std::exception& e) {
+                       } catch (const std::exception& e) {
                                ERR("Failed to disable consumed-size notification in ROTATION_SET_SCHEDULE command: %s",
                                    e.what());
                                ret = LTTNG_ERR_UNK;
This page took 0.023721 seconds and 4 git commands to generate.