Fix: don't quiet the consumer if opt_quiet is not set
[lttng-tools.git] / src / bin / lttng-sessiond / main.c
index 1a5eeb07e01dce2b1fcd22fdbb11f9b639b99ff6..052e32e0c32ec2fb8bfe2a17e71afa0487ebf868 100644 (file)
@@ -205,8 +205,10 @@ static pthread_t jul_reg_thread;
  * UST registration command queue. This queue is tied with a futex and uses a N
  * wakers / 1 waiter implemented and detailed in futex.c/.h
  *
- * The thread_manage_apps and thread_dispatch_ust_registration interact with
- * this queue and the wait/wake scheme.
+ * The thread_registration_apps and thread_dispatch_ust_registration uses this
+ * queue along with the wait/wake scheme. The thread_manage_apps receives down
+ * the line new application socket and monitors it for any I/O error or clean
+ * close that triggers an unregistration of the application.
  */
 static struct ust_cmd_queue ust_cmd_queue;
 
@@ -2231,9 +2233,12 @@ static pid_t spawn_consumerd(struct consumer_data *consumer_data)
                 */
                if (opt_verbose_consumer) {
                        verbosity = "--verbose";
-               } else {
+               } else if (lttng_opt_quiet) {
                        verbosity = "--quiet";
+               } else {
+                       verbosity = "";
                }
+
                switch (consumer_data->type) {
                case LTTNG_CONSUMER_KERNEL:
                        /*
@@ -3159,7 +3164,9 @@ skip_domain:
                struct lttng_event *events;
                ssize_t nb_events;
 
+               session_lock_list();
                nb_events = cmd_list_tracepoints(cmd_ctx->lsm->domain.type, &events);
+               session_unlock_list();
                if (nb_events < 0) {
                        /* Return value is a negative lttng_error_code. */
                        ret = -nb_events;
@@ -3190,8 +3197,10 @@ skip_domain:
                struct lttng_event_field *fields;
                ssize_t nb_fields;
 
+               session_lock_list();
                nb_fields = cmd_list_tracepoint_fields(cmd_ctx->lsm->domain.type,
                                &fields);
+               session_unlock_list();
                if (nb_fields < 0) {
                        /* Return value is a negative lttng_error_code. */
                        ret = -nb_fields;
This page took 0.02395 seconds and 4 git commands to generate.