0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2025-01-19 19:11:53 +01:00

ircd:Ⓜ️:v1: IO'ing buffers must be on ctx's stack.

This commit is contained in:
Jason Volk 2018-04-06 02:30:26 -07:00
parent 4c26b65613
commit f26410f5c3

View file

@ -161,14 +161,11 @@ ircd::m::v1::backfill::backfill(const room::id &room_id,
if(!opts.remote) if(!opts.remote)
opts.remote = room_id.host(); opts.remote = room_id.host();
m::event::id::buf event_id_buf;
if(!opts.event_id) if(!opts.event_id)
{ {
thread_local m::event::id::buf event_id event_id_buf = fetch_head(room_id, opts.remote);
{ opts.event_id = event_id_buf;
fetch_head(room_id, opts.remote)
};
opts.event_id = event_id;
} }
if(!defined(json::get<"origin"_>(opts.request))) if(!defined(json::get<"origin"_>(opts.request)))
@ -236,14 +233,11 @@ ircd::m::v1::state::state(const room::id &room_id,
if(!opts.remote) if(!opts.remote)
opts.remote = room_id.host(); opts.remote = room_id.host();
m::event::id::buf event_id_buf;
if(!opts.event_id) if(!opts.event_id)
{ {
thread_local m::event::id::buf event_id event_id_buf = fetch_head(room_id, opts.remote);
{ opts.event_id = event_id_buf;
fetch_head(room_id, opts.remote)
};
opts.event_id = event_id;
} }
if(!defined(json::get<"origin"_>(opts.request))) if(!defined(json::get<"origin"_>(opts.request)))