#include "live.h"
#include "health-relayd.h"
#include "testpoint.h"
+#include "viewer-stream.h"
/* command line options */
char *opt_output_path;
}
}
- vstream = live_find_viewer_stream_by_id(stream->stream_handle);
+ vstream = viewer_stream_find_by_id(stream->stream_handle);
if (vstream) {
/*
* Set the last good value into the viewer stream. This is done
session->sock = cmd->sock;
session->minor = cmd->minor;
session->major = cmd->major;
+ pthread_mutex_init(&session->viewer_ready_lock, NULL);
cmd->session = session;
reply.session_id = htobe64(session->id);
{
struct relay_stream_recv_handle *node, *tmp_node;
+ pthread_mutex_lock(&cmd->session->viewer_ready_lock);
+
cds_list_for_each_entry_safe(node, tmp_node, &cmd->recv_head, node) {
struct relay_stream *stream;
free(node);
}
+ pthread_mutex_unlock(&cmd->session->viewer_ready_lock);
return;
}
(stream->oldest_tracefile_id + 1) %
stream->tracefile_count;
}
- vstream = live_find_viewer_stream_by_id(stream->stream_handle);
+ vstream = viewer_stream_find_by_id(stream->stream_handle);
if (vstream) {
/*
* The viewer is reading a file about to be