actions: introduce stop session action
[lttng-tools.git] / src / common / actions / action.c
index bd11301cc8ba1ae0f1062b120247f7aa043958bd..208858e2671c6d94210b9dd81cccbae57a1dd56a 100644 (file)
@@ -10,6 +10,7 @@
 #include <lttng/action/action-internal.h>
 #include <lttng/action/notify-internal.h>
 #include <lttng/action/start-session-internal.h>
+#include <lttng/action/stop-session-internal.h>
 
 static const char *lttng_action_type_string(enum lttng_action_type action_type)
 {
@@ -20,6 +21,8 @@ static const char *lttng_action_type_string(enum lttng_action_type action_type)
                return "NOTIFY";
        case LTTNG_ACTION_TYPE_START_SESSION:
                return "START_SESSION";
+       case LTTNG_ACTION_TYPE_STOP_SESSION:
+               return "STOP_SESSION";
        default:
                return "???";
        }
@@ -134,6 +137,10 @@ ssize_t lttng_action_create_from_buffer(const struct lttng_buffer_view *view,
                create_from_buffer_cb =
                                lttng_action_start_session_create_from_buffer;
                break;
+       case LTTNG_ACTION_TYPE_STOP_SESSION:
+               create_from_buffer_cb =
+                               lttng_action_stop_session_create_from_buffer;
+               break;
        default:
                ERR("Failed to create action from buffer, unhandled action type: action-type=%u (%s)",
                                action_comm->action_type,
This page took 0.025555 seconds and 4 git commands to generate.