Refactor consumerd main/cleanup
[lttng-tools.git] / src / bin / lttng-relayd / main.c
index 00b8735f2ca3c37e6df9de649bf2098d6d712960..27a428a273734a8e558e99132e04902ea1de4b32 100644 (file)
@@ -234,6 +234,11 @@ int set_option(int opt, const char *arg, const char *optname)
                break;
        case 'g':
                tracing_group_name = strdup(arg);
+               if (tracing_group_name == NULL) {
+                       ret = -errno;
+                       PERROR("strdup");
+                       goto end;
+               }
                tracing_group_name_override = 1;
                break;
        case 'h':
@@ -2333,7 +2338,6 @@ int relay_process_data(struct relay_connection *conn)
                                stream->tracefile_size, stream->tracefile_count,
                                relayd_uid, relayd_gid, stream->fd,
                                &(stream->tracefile_count_current), &stream->fd);
-               stream->total_index_received = 0;
                pthread_mutex_unlock(&stream->viewer_stream_rotation_lock);
                if (ret < 0) {
                        ERR("Rotating stream output file");
@@ -2617,6 +2621,7 @@ restart:
 
                                if (revents & LPOLLIN) {
                                        if (conn->type != RELAY_DATA) {
+                                               rcu_read_unlock();
                                                continue;
                                        }
 
This page took 0.023159 seconds and 4 git commands to generate.