}
}
-
rpcs::rpcs(unsigned int p1, int count)
: port_(p1), counting_(count), curr_counts_(count), lossytest_(0), reachable_ (true)
{
lossytest_ = atoi(loss_env);
}
- reg(rpc_const::bind, this, &rpcs::rpcbind);
+ reg(rpc_const::bind, &rpcs::rpcbind, this);
dispatchpool_ = new ThrPool(6,false);
listener_ = new tcpsconn(this, port_, lossytest_);
updatestat(proc);
}
- rh.ret = f->fn(req, rep);
- if (rh.ret == rpc_const::unmarshal_args_failure) {
- fprintf(stderr, "rpcs::dispatch: failed to"
- " unmarshall the arguments. You are"
- " probably calling RPC 0x%x with wrong"
- " types of arguments.\n", proc);
- VERIFY(0);
- }
+ rh.ret = (*f)(req, rep);
+ if (rh.ret == rpc_const::unmarshal_args_failure) {
+ fprintf(stderr, "rpcs::dispatch: failed to"
+ " unmarshall the arguments. You are"
+ " probably calling RPC 0x%x with wrong"
+ " types of arguments.\n", proc);
+ VERIFY(0);
+ }
VERIFY(rh.ret >= 0);
rep.pack_reply_header(rh);
// rpc handler
int
-rpcs::rpcbind(int a, int &r)
+rpcs::rpcbind(int &r, int a)
{
jsl_log(JSL_DBG_2, "rpcs::rpcbind called return nonce %u\n", nonce_);
r = nonce_;