X-Git-Url: http://xvm.mit.edu/gitweb/invirt/third/libt4.git/blobdiff_plain/26ade07ab0e62b98b452fbbd18edba0450035e35..03b35a9a1bd1f583e32b27d260b223a0989d6c75:/rpc/rpc.cc?ds=sidebyside diff --git a/rpc/rpc.cc b/rpc/rpc.cc index 00f6d2e..de33675 100644 --- a/rpc/rpc.cc +++ b/rpc/rpc.cc @@ -60,6 +60,9 @@ #include #include +using std::list; +using namespace std::chrono; + inline void set_rand_seed() { auto now = time_point_cast(steady_clock::now()); srandom((uint32_t)now.time_since_epoch().count()^(uint32_t)getpid()); @@ -186,7 +189,7 @@ int rpcc::call1(proc_id_t proc, milliseconds to, string & rep, marshall & req) { lock cal(ca.m); while (!ca.done) { IF_LEVEL(2) LOG << "wait"; - if (ca.c.wait_until(cal, nextdeadline) == cv_status::timeout) { + if (ca.c.wait_until(cal, nextdeadline) == std::cv_status::timeout) { IF_LEVEL(2) LOG << "timeout"; break; } @@ -404,7 +407,7 @@ void rpcs::dispatch(shared_ptr c, const string & buf) { switch (check_duplicate_and_update(h.clt_nonce, h.xid, h.xid_rep, b1)) { case NEW: // new request - rh.ret = (*f)(forward(req), rep); + rh.ret = (*f)(std::forward(req), rep); if (rh.ret == rpc_protocol::unmarshall_args_failure) { LOG << "failed to unmarshall the arguments. You are " << "probably calling RPC 0x" << std::hex << proc << " with the wrong " @@ -555,6 +558,6 @@ static sockaddr_in make_sockaddr(const string & hostandport) { memcpy(&a, hp->h_addr_list[0], sizeof(in_addr_t)); dst.sin_addr.s_addr = a.s_addr; } - dst.sin_port = hton((in_port_t)stoi(port)); + dst.sin_port = hton((in_port_t)std::stoi(port)); return dst; }