X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fmain.c;h=195174a4edf259d24e2e0d523f0dd243805e4f01;hp=85904c812cdbab2f53ef0747014ad274a2e38ac4;hb=92db7cdc97f4bb5776fa698442d8af4e5c1e3bf3;hpb=9363801e2d2069022a05e67066d8f527538946d0 diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index 85904c812..195174a4e 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -1021,7 +1021,8 @@ restart: lttcomm_connect_unix_sock(consumer_data->cmd_unix_sock_path); consumer_data->metadata_fd = lttcomm_connect_unix_sock(consumer_data->cmd_unix_sock_path); - if (consumer_data->cmd_sock < 0 || consumer_data->metadata_fd < 0) { + if (consumer_data->cmd_sock < 0 + || consumer_data->metadata_fd < 0) { PERROR("consumer connect cmd socket"); /* On error, signal condition and quit. */ signal_consumer_condition(consumer_data, -1); @@ -1140,8 +1141,8 @@ exit: error: /* * We lock here because we are about to close the sockets and some other - * thread might be using them so wait before we are exclusive which will - * abort all other consumer command by other threads. + * thread might be using them so get exclusive access which will abort all + * other consumer command by other threads. */ pthread_mutex_lock(&consumer_data->lock); @@ -1188,6 +1189,7 @@ error: unlink(consumer_data->cmd_unix_sock_path); consumer_data->pid = 0; pthread_mutex_unlock(&consumer_data->lock); + /* Cleanup metadata socket mutex. */ pthread_mutex_destroy(consumer_data->metadata_sock.lock); free(consumer_data->metadata_sock.lock);