Add Python agent support
[lttng-tools.git] / src / bin / lttng-sessiond / save.c
index d268f33190698d6f9bd920a5bbdbab140a377d70..aae56a8954a081d11508fa8a02f6dc081b7aafb5 100644 (file)
@@ -801,6 +801,11 @@ int save_kernel_contexts(struct config_writer *writer,
        int ret;
        struct ltt_kernel_context *ctx;
 
+       if (cds_list_empty(&kchan->ctx_list)) {
+               ret = 0;
+               goto end;
+       }
+
        ret = config_writer_open_element(writer, config_element_contexts);
        if (ret) {
                ret = LTTNG_ERR_SAVE_IO_FAIL;
@@ -1156,7 +1161,8 @@ int save_ust_session(struct config_writer *writer,
 
                ust_chan = caa_container_of(node, struct ltt_ust_channel, node);
                agent_channel = !strcmp(DEFAULT_JUL_CHANNEL_NAME, ust_chan->name) ||
-                       !strcmp(DEFAULT_LOG4J_CHANNEL_NAME, ust_chan->name);
+                       !strcmp(DEFAULT_LOG4J_CHANNEL_NAME, ust_chan->name) ||
+                       !strcmp(DEFAULT_PYTHON_CHANNEL_NAME, ust_chan->name);
                if (!(save_agent ^ agent_channel)) {
                        ret = save_ust_channel(writer, ust_chan, session->ust_session);
                        if (ret) {
This page took 0.022816 seconds and 4 git commands to generate.