projects
/
invirt/third/libt4.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cosmetic changes
[invirt/third/libt4.git]
/
rpc
/
rpc.cc
diff --git
a/rpc/rpc.cc
b/rpc/rpc.cc
index
80ec124
..
a74d907
100644
(file)
--- a/
rpc/rpc.cc
+++ b/
rpc/rpc.cc
@@
-145,7
+145,7
@@
void rpcc::cancel(lock & m_lock) {
}
}
}
}
-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;
caller ca(0, &rep);
xid_t xid_rep;
@@
-413,9
+413,9
@@
void rpcs::dispatch(shared_ptr<connection> c, const string & buf) {
conns_[h.clt_nonce] = c;
}
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) {
case NEW: // new request
rh.ret = (*f)(std::forward<unmarshall>(req), rep);
if (rh.ret == rpc_protocol::unmarshall_args_failure) {
@@
-427,13
+427,13
@@
void rpcs::dispatch(shared_ptr<connection> c, const string & buf) {
VERIFY(rh.ret >= 0);
rep.write_header(rh);
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;
<< 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
{
// get the latest connection to the client
{
@@
-442,12
+442,12
@@
void rpcs::dispatch(shared_ptr<connection> c, const string & buf) {
c = conns_[h.clt_nonce];
}
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
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;
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;