mirror of
https://github.com/matrix-construct/construct
synced 2024-11-20 17:01:55 +01:00
ircd:Ⓜ️ Improve various options related.
This commit is contained in:
parent
55d5b4d1a7
commit
95d6561ca1
6 changed files with 13 additions and 39 deletions
|
@ -95,7 +95,7 @@ struct ircd::m::feds::result
|
|||
struct ircd::m::feds::opts
|
||||
{
|
||||
/// Operation type
|
||||
enum op op {(enum op)0};
|
||||
feds::op op {feds::op::noop};
|
||||
|
||||
/// Timeout for this operation. For a batch of operations, this system
|
||||
/// may attempt -- but does not guarantee -- to cancel timed-out requests
|
||||
|
|
|
@ -69,7 +69,7 @@ enum class ircd::m::fetch::op
|
|||
struct ircd::m::fetch::opts
|
||||
{
|
||||
/// Operation to perform.
|
||||
fetch::op op {op::noop};
|
||||
fetch::op op {fetch::op::noop};
|
||||
|
||||
/// room::id apropos. Many federation requests require a room_id, but
|
||||
/// nevertheless a room_id is still used by this unit as a pool of servers.
|
||||
|
|
|
@ -203,8 +203,6 @@ struct ircd::m::vm::opts
|
|||
|
||||
/// Point this at a json::stack to transcribe output.
|
||||
json::stack::object *out {nullptr};
|
||||
|
||||
opts() noexcept;
|
||||
};
|
||||
|
||||
/// Extension structure to vm::opts which includes additional options for
|
||||
|
@ -244,6 +242,4 @@ struct ircd::m::vm::copts
|
|||
|
||||
/// Whether to log an info message after commit accepted
|
||||
bool infolog_postcommit {false};
|
||||
|
||||
copts() noexcept;
|
||||
};
|
||||
|
|
|
@ -169,7 +169,7 @@ ircd::m::fetch::start(opts opts)
|
|||
|
||||
assert(!exists || it->opts.room_id == opts.room_id);
|
||||
if(!exists)
|
||||
it = requests.emplace_hint(it, opts);
|
||||
it = requests.emplace_hint(it, std::move(opts));
|
||||
|
||||
auto &request
|
||||
{
|
||||
|
|
|
@ -364,19 +364,17 @@ catch(const std::exception &e)
|
|||
void
|
||||
ircd::m::init::backfill::handle_room(const room::id &room_id)
|
||||
{
|
||||
{
|
||||
struct m::acquire::opts opts;
|
||||
opts.room = room_id;
|
||||
opts.viewport_size = ssize_t(m::room::events::viewport_size);
|
||||
opts.viewport_size *= size_t(viewports);
|
||||
opts.vmopts.infolog_accept = true;
|
||||
opts.vmopts.warnlog &= ~vm::fault::EXISTS;
|
||||
opts.attempt_max = size_t(attempt_max);
|
||||
m::acquire
|
||||
m::acquire
|
||||
{{
|
||||
.room = room_id,
|
||||
.viewport_size = ssize_t(m::room::events::viewport_size) * size_t(viewports),
|
||||
.attempt_max = size_t(attempt_max),
|
||||
.vmopts = vm::opts
|
||||
{
|
||||
opts
|
||||
};
|
||||
}
|
||||
.warnlog = 0,
|
||||
.infolog_accept = true,
|
||||
},
|
||||
}};
|
||||
|
||||
if(reset_head)
|
||||
room::head::reset(room(room_id));
|
||||
|
|
20
matrix/vm.cc
20
matrix/vm.cc
|
@ -258,23 +258,3 @@ ircd::m::vm::sequence::get(const eval &eval)
|
|||
{
|
||||
return eval.sequence;
|
||||
}
|
||||
|
||||
//
|
||||
// copts (creation options)
|
||||
//
|
||||
|
||||
// Out-of-line linkage
|
||||
ircd::m::vm::copts::copts()
|
||||
noexcept
|
||||
{
|
||||
}
|
||||
|
||||
//
|
||||
// opts (options)
|
||||
//
|
||||
|
||||
// Out-of-line linkage
|
||||
ircd::m::vm::opts::opts()
|
||||
noexcept
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue