Commit 0ba0b8e8 authored by Marius Vlad's avatar Marius Vlad Committed by Daniel Stone

weston-log-flight-rec: Don't allow more than one flight recorder to be

created

Having a (single) global variable which others depend on it implies
having a single flight recorder present. Until we have a reason to
support multiple flight recorders limit the amount to a maximum of one.
Signed-off-by: Marius Vlad's avatarMarius Vlad <marius.vlad@collabora.com>
Reported-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.com>
parent b1f5f807
......@@ -233,6 +233,9 @@ weston_log_subscriber_create_flight_rec(size_t size)
struct weston_debug_log_flight_recorder *flight_rec;
char *weston_rb;
assert("Can't create more than one flight recorder." &&
!weston_primary_flight_recorder_ring_buffer);
flight_rec = zalloc(sizeof(*flight_rec));
if (!flight_rec)
return NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment