From 5d3b6c0a0b690e332f5d6b9eceaf4490471bf9eb Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Fri, 8 Feb 2019 07:55:44 -0800 Subject: [PATCH] modules/federation/send: Use array eval here. --- modules/federation/send.cc | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/modules/federation/send.cc b/modules/federation/send.cc index 80bd20ee9..32cc3f4cf 100644 --- a/modules/federation/send.cc +++ b/modules/federation/send.cc @@ -55,10 +55,10 @@ handle_edu(client &client, } void -handle_pdu(client &client, - const resource::request::object &request, - const string_view &txn_id, - const m::event &event) +handle_pdus(client &client, + const resource::request::object &request, + const string_view &txn_id, + const json::array &pdus) { m::vm::opts vmopts; vmopts.non_conform.set(m::event::conforms::MISSING_PREV_STATE); @@ -69,7 +69,7 @@ handle_pdu(client &client, vmopts.errorlog &= ~m::vm::fault::STATE; m::vm::eval eval { - event, vmopts + pdus, vmopts }; } @@ -142,12 +142,11 @@ handle_put(client &client, for(const auto &pdu_failure : pdu_failures) handle_pdu_failure(client, request, txn_id, pdu_failure); + handle_pdus(client, request, txn_id, pdus); + for(const json::object &edu : edus) handle_edu(client, request, txn_id, edu); - for(const json::object &pdu : pdus) - handle_pdu(client, request, txn_id, pdu); - return resource::response { client, http::OK