+ // if first arg is a PeerPtr, replace it by the address of the peer originally receiving the RpcCall
+ if (peer && i == 0 && args[0] == qMetaTypeId<PeerPtr>()) {
+ QVariant v = QVariant::fromValue<PeerPtr>(peer);
+ _a[1] = const_cast<void*>(v.constData());
+ } else
+ _a[i+1] = const_cast<void *>(params[i].constData());