Cosmetic changes
[invirt/third/libt4.git] / rpc / rpc.h
index df5d89e..ddf15f9 100644 (file)
--- a/rpc/rpc.h
+++ b/rpc/rpc.h
@@ -94,20 +94,14 @@ class rpcc : private connection_delegate {
         request dup_req_;
         int xid_rep_done_ = -1;
 
-        int call1(proc_id_t proc, milliseconds to, string & rep, marshall & req);
+        int call_marshalled(proc_id_t proc, milliseconds to, string & rep, marshall & req);
 
         template<class R>
         inline int call_m(proc_id_t proc, milliseconds to, R & r, marshall && req) {
             string rep;
-            int intret = call1(proc, to, rep, req);
-            if (intret < 0) return intret;
-            unmarshall u(rep, true, r);
-            if (u.okdone() != true) {
-                LOG << "rpcc::call_m: failed to unmarshall the reply.  You are probably "
-                    << "calling RPC 0x" << std::hex << proc << " with the wrong return type.";
-                VERIFY(0);
-                return rpc_protocol::unmarshall_reply_failure;
-            }
+            int intret = call_marshalled(proc, to, rep, req);
+            if (intret >= 0)
+                VERIFY(unmarshall(rep, true, r).okdone()); // guaranteed by static type checking
             return intret;
         }
 
@@ -118,8 +112,6 @@ class rpcc : private connection_delegate {
         rpcc(const string & d);
         ~rpcc();
 
-        nonce_t id() { return clt_nonce_; }
-
         int bind(milliseconds to = rpc::to_max);
 
         // Manages a cache of RPC connections.  Usage: