}
}
-int rpcc::call1(proc_id_t proc, milliseconds to, string & rep, marshall & req) {
+int rpcc::call_marshalled(proc_id_t proc, milliseconds to, string & rep, marshall & req) {
caller ca(0, &rep);
xid_t xid_rep;
conns_[h.clt_nonce] = c;
}
- string b1;
+ string stored_reply;
- switch (check_duplicate_and_update(h.clt_nonce, h.xid, h.xid_rep, b1)) {
+ switch (check_duplicate_and_update(h.clt_nonce, h.xid, h.xid_rep, stored_reply)) {
case NEW: // new request
rh.ret = (*f)(std::forward<unmarshall>(req), rep);
if (rh.ret == rpc_protocol::unmarshall_args_failure) {
VERIFY(rh.ret >= 0);
rep.write_header(rh);
- b1 = rep;
+ stored_reply = rep;
- IF_LEVEL(2) LOG << "sending and saving reply of size " << b1.size() << " for rpc "
+ IF_LEVEL(2) LOG << "sending and saving reply of size " << stored_reply.size() << " for rpc "
<< h.xid << ", proc " << std::hex << proc << " ret " << std::dec
<< rh.ret << ", clt " << h.clt_nonce;
- add_reply(h.clt_nonce, h.xid, b1);
+ add_reply(h.clt_nonce, h.xid, stored_reply);
// get the latest connection to the client
{
c = conns_[h.clt_nonce];
}
- c->send(rep);
+ c->send(stored_reply);
break;
case INPROGRESS: // server is working on this request
break;
case DONE: // duplicate and we still have the response
- c->send(b1);
+ c->send(stored_reply);
break;
case FORGOTTEN: // very old request and we don't have the response anymore
IF_LEVEL(2) LOG << "very old request " << h.xid << " from " << h.clt_nonce;