+/*
+ * Set default attributes depending on those already defined from the command
+ * line.
+ */
+static void set_default_attr(struct lttng_domain *dom)
+{
+ struct lttng_channel_attr default_attr;
+
+ /* Set attributes */
+ lttng_channel_set_default_attr(dom, &default_attr);
+
+ if (chan.attr.overwrite == -1) {
+ chan.attr.overwrite = default_attr.overwrite;
+ }
+ if (chan.attr.subbuf_size == -1) {
+ chan.attr.subbuf_size = default_attr.subbuf_size;
+ }
+ if (chan.attr.num_subbuf == -1) {
+ chan.attr.num_subbuf = default_attr.num_subbuf;
+ }
+ if (chan.attr.switch_timer_interval == -1) {
+ chan.attr.switch_timer_interval = default_attr.switch_timer_interval;
+ }
+ if (chan.attr.read_timer_interval == -1) {
+ chan.attr.read_timer_interval = default_attr.read_timer_interval;
+ }
+ if (chan.attr.output == -1) {
+ chan.attr.output = default_attr.output;
+ }
+}
+