0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-08 04:58:58 +02:00

ircd:Ⓜ️ Tweak various federation request buffer options; related e3e83a6423fd.

This commit is contained in:
Jason Volk 2020-03-07 19:36:06 -08:00
parent 49dc7e77f2
commit 44f587714e
10 changed files with 8 additions and 19 deletions

View file

@ -1416,11 +1416,12 @@ ircd::m::fed::fetch_head(const id::room &room_id,
{
const unique_buffer<mutable_buffer> buf
{
16_KiB
32_KiB
};
make_join::opts opts;
opts.remote = remote;
opts.dynamic = false;
make_join request
{
room_id, user_id, buf, std::move(opts)

View file

@ -225,7 +225,6 @@ ircd::m::feds::backfill(const opts &opts,
(auto &request, const auto &origin)
{
m::fed::backfill::opts v1opts;
v1opts.dynamic = true;
v1opts.event_id = opts.event_id;
v1opts.limit = opts.argi[0];
v1opts.remote = string_view
@ -250,7 +249,6 @@ ircd::m::feds::state(const opts &opts,
(auto &request, const auto &origin)
{
m::fed::state::opts v1opts;
v1opts.dynamic = true;
v1opts.ids_only = opts.arg[0] == "ids";
v1opts.event_id = opts.event_id;
v1opts.remote = string_view
@ -275,7 +273,6 @@ ircd::m::feds::event(const opts &opts,
(auto &request, const auto &origin)
{
m::fed::event::opts v1opts;
v1opts.dynamic = true;
v1opts.remote = string_view
{
strlcpy{request.origin, origin}
@ -298,7 +295,6 @@ ircd::m::feds::auth(const opts &opts,
(auto &request, const auto &origin)
{
m::fed::event_auth::opts v1opts;
v1opts.dynamic = true;
v1opts.remote = string_view
{
strlcpy{request.origin, origin}

View file

@ -463,7 +463,6 @@ try
{
fed::event_auth::opts opts;
opts.remote = remote;
opts.dynamic = true;
request.future = std::make_unique<fed::event_auth>
(
request.opts.room_id,
@ -479,7 +478,6 @@ try
{
fed::event::opts opts;
opts.remote = remote;
opts.dynamic = true;
request.future = std::make_unique<fed::event>
(
request.opts.event_id,
@ -494,7 +492,6 @@ try
{
fed::backfill::opts opts;
opts.remote = remote;
opts.dynamic = true;
opts.limit = request.opts.backfill_limit;
opts.limit = opts.limit?: size_t(backfill_limit_default);
opts.event_id = request.opts.event_id;

View file

@ -220,10 +220,10 @@ try
m::fed::key::opts opts;
opts.remote = query_server;
opts.dynamic = true;
opts.dynamic = false;
const unique_buffer<mutable_buffer> buf
{
16_KiB
32_KiB
};
m::fed::key::query request
@ -332,7 +332,7 @@ try
opts.dynamic = false;
const unique_buffer<mutable_buffer> buf
{
16_KiB
32_KiB
};
m::fed::key::keys request

View file

@ -368,7 +368,7 @@ try
m::fed::query::opts opts;
opts.remote = remote;
opts.dynamic = true;
opts.dynamic = false;
m::fed::query::directory request
{

View file

@ -416,7 +416,6 @@ try
};
m::fed::backfill::opts opts{host};
opts.dynamic = true;
opts.event_id = event_id;
opts.limit = size_t(backfill_limit);
m::fed::backfill request
@ -606,7 +605,6 @@ try
};
m::fed::send_join::opts opts{host};
opts.dynamic = true;
m::fed::send_join send_join
{
room_id, event_id, event, buf, std::move(opts)

View file

@ -74,7 +74,6 @@ ircd::m::rooms::summary::fetch::fetch(const string_view &origin,
opts.limit = limit;
opts.since = since;
opts.include_all_networks = true;
opts.dynamic = true;
const unique_buffer<mutable_buffer> buf
{
// Buffer for headers and send content; received content is dynamic

View file

@ -128,12 +128,11 @@ ircd::m::user::profile::fetch(const m::user &user,
{
const unique_buffer<mutable_buffer> buf
{
64_KiB
16_KiB
};
m::fed::query::opts opts;
opts.remote = remote?: user.user_id.host();
opts.dynamic = true;
m::fed::query::profile federation_request
{
user.user_id, key, buf, std::move(opts)

View file

@ -324,7 +324,6 @@ try
{
m::fed::user::keys::query::opts opts;
opts.remote = remote;
opts.dynamic = true;
const auto &buffer
{
buffers.emplace_back(16_KiB)

View file

@ -14052,7 +14052,6 @@ console_cmd__fed__key__query(opt &out, const string_view &line)
});
m::fed::key::opts opts;
opts.dynamic = true;
opts.remote = param.at("remote");
const unique_buffer<mutable_buffer> buf{24_KiB};
@ -14091,6 +14090,7 @@ console_cmd__fed__version(opt &out, const string_view &line)
m::fed::version::opts opts;
opts.remote = param.at("remote");
opts.dynamic = false;
const unique_mutable_buffer buf
{
16_KiB