save/load: add blocking_timeout attribute to channel
[lttng-tools.git] / src / common / config / session-config.c
index 389d05427692210e5c483b8c62fb9ae465ee0d83..9f8640359fc14505f7e31b78af52195e878a9434 100644 (file)
@@ -2105,6 +2105,31 @@ int process_channel_attr_node(xmlNodePtr attr_node,
                        ret = -LTTNG_ERR_LOAD_INVALID_CONFIG;
                        goto end;
                }
+       } else if (!strcmp((const char *) attr_node->name,
+                       config_element_blocking_timeout)) {
+               xmlChar *content;
+               int64_t blocking_timeout = 0;
+
+               /* blocking_timeout */
+               content = xmlNodeGetContent(attr_node);
+               if (!content) {
+                       ret = -LTTNG_ERR_NOMEM;
+                       goto end;
+               }
+
+               ret = parse_int(content, &blocking_timeout);
+               free(content);
+               if (ret) {
+                       ret = -LTTNG_ERR_LOAD_INVALID_CONFIG;
+                       goto end;
+               }
+
+               ret = lttng_channel_set_blocking_timeout(channel,
+                       blocking_timeout);
+               if (ret) {
+                       ret = -LTTNG_ERR_LOAD_INVALID_CONFIG;
+                       goto end;
+               }
        } else if (!strcmp((const char *) attr_node->name,
                        config_element_events)) {
                /* events */
This page took 0.026043 seconds and 5 git commands to generate.