projects
/
invirt/third/libt4.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Variadic templates for RPCs
[invirt/third/libt4.git]
/
paxos.cc
diff --git
a/paxos.cc
b/paxos.cc
index
89f1714
..
4434788
100644
(file)
--- a/
paxos.cc
+++ b/
paxos.cc
@@
-157,7
+157,7
@@
proposer::prepare(unsigned instance, std::vector<std::string> &accepts,
handle h(*i);
if (!(r = h.safebind()))
continue;
handle h(*i);
if (!(r = h.safebind()))
continue;
- int status = r->call(paxos_protocol::preparereq, me, arg, res, rpcc::to(1000));
+ int status = r->call_timeout(paxos_protocol::preparereq, rpcc::to(1000), res, me, arg);
if (status == paxos_protocol::OK) {
if (res.oldinstance) {
tprintf("commiting old instance!\n");
if (status == paxos_protocol::OK) {
if (res.oldinstance) {
tprintf("commiting old instance!\n");
@@
-190,7
+190,7
@@
proposer::accept(unsigned instance, std::vector<std::string> &accepts,
if (!(r = h.safebind()))
continue;
bool accept = false;
if (!(r = h.safebind()))
continue;
bool accept = false;
- int status = r->call(paxos_protocol::acceptreq, me, arg, accept, rpcc::to(1000));
+ int status = r->call_timeout(paxos_protocol::acceptreq, rpcc::to(1000), accept, me, arg);
if (status == paxos_protocol::OK) {
if (accept)
accepts.push_back(*i);
if (status == paxos_protocol::OK) {
if (accept)
accepts.push_back(*i);
@@
-209,7
+209,7
@@
proposer::decide(unsigned instance, std::vector<std::string> accepts,
if (!(r = h.safebind()))
continue;
int res = 0;
if (!(r = h.safebind()))
continue;
int res = 0;
- r->call(paxos_protocol::decidereq, me, arg, res, rpcc::to(1000));
+ r->call_timeout(paxos_protocol::decidereq, rpcc::to(1000), res, me, arg);
}
}
}
}