Variadic templates for RPCs
[invirt/third/libt4.git] / rpc / rpc.cc
index 5de3984..a5d5b1f 100644 (file)
@@ -128,7 +128,7 @@ int
 rpcc::bind(TO to)
 {
     int r;
-    int ret = call(rpc_const::bind, 0, r, to);
+    int ret = call_timeout(rpc_const::bind, to, r, 0);
     if(ret == 0){
         lock ml(m_);
         bind_done_ = true;
@@ -424,7 +424,7 @@ rpcs::got_pdu(connection *c, char *b, int sz)
 
     djob_t *j = new djob_t(c, b, sz);
     c->incref();
-    bool succ = dispatchpool_->addObjJob(this, &rpcs::dispatch, j);
+    bool succ = dispatchpool_->addJob(std::bind(&rpcs::dispatch, this, j));
     if(!succ || !reachable_){
         c->decref();
         delete j;