0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 10:12:39 +01:00

ircd:Ⓜ️:vm: Set eval event/event_id members in outer frame.

This commit is contained in:
Jason Volk 2020-03-25 17:11:39 -07:00
parent b8239d45cd
commit 1e96e34b54

View file

@ -215,22 +215,6 @@ ircd::m::vm::execute(eval &eval,
if(m::exists(event.event_id)) if(m::exists(event.event_id))
return fault::EXISTS; return fault::EXISTS;
return execute_du(eval, event);
}
ircd::m::vm::fault
ircd::m::vm::execute_du(eval &eval,
const event &event)
try
{
assert(eval.id);
assert(eval.ctx);
assert(eval.opts);
const auto &opts
{
*eval.opts
};
// Set a member pointer to the event currently being evaluated. This // Set a member pointer to the event currently being evaluated. This
// allows other parallel evals to have deep access to this eval. It also // allows other parallel evals to have deep access to this eval. It also
// will be used to count this event as currently being evaluated. // will be used to count this event as currently being evaluated.
@ -251,10 +235,25 @@ try
eval.event_id eval.event_id
}; };
return execute_du(eval, event);
}
ircd::m::vm::fault
ircd::m::vm::execute_du(eval &eval,
const event &event)
try
{
assert(eval.id);
assert(eval.ctx);
assert(eval.opts);
assert(eval.opts->edu || event.event_id); assert(eval.opts->edu || event.event_id);
assert(eval.opts->edu || eval.event_id); assert(eval.opts->edu || eval.event_id);
assert(eval.event_id == event.event_id); assert(eval.event_id == event.event_id);
assert(eval.event_); assert(eval.event_);
const auto &opts
{
*eval.opts
};
// The issue hook is only called when this server is injecting a newly // The issue hook is only called when this server is injecting a newly
// created event. // created event.