mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-06 18:28:00 +02:00
compositor: Pass the length to opem_stream for one shot scene-graph
Rather than passing a NULL use sizeloc to pass the size. Otherwise
fflush(3) and fclose(3) would die out crashing in libc.
Use size also when printing out to a subscriber.
Fixes: e9665ef36
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
This commit is contained in:
parent
f324d30024
commit
d59e58bb79
1 changed files with 3 additions and 2 deletions
|
|
@ -9900,6 +9900,7 @@ debug_scene_graph_cb(struct weston_log_subscription *sub, void *data)
|
|||
struct weston_compositor *ec = data;
|
||||
FILE *fp;
|
||||
char *str;
|
||||
size_t ret;
|
||||
|
||||
/* If the presentation_clock is CLOCK_REALTIME, then it is
|
||||
* uninitialized. This means no back-end is loaded yet, so we can't
|
||||
|
|
@ -9907,11 +9908,11 @@ debug_scene_graph_cb(struct weston_log_subscription *sub, void *data)
|
|||
if (ec->presentation_clock == CLOCK_REALTIME)
|
||||
return;
|
||||
|
||||
fp = open_memstream(&str, NULL);
|
||||
fp = open_memstream(&str, &ret);
|
||||
weston_compositor_print_scene_graph(ec, fp);
|
||||
fclose(fp);
|
||||
|
||||
weston_log_subscription_write(sub, str, strlen(str));
|
||||
weston_log_subscription_write(sub, str, ret);
|
||||
free(str);
|
||||
|
||||
weston_log_subscription_complete(sub);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue