- std::string rep;
- std::string res;
- int intret = invoke(proc, rep, req.cstr());
- VERIFY( intret == rsm_client_protocol::OK );
- unmarshall u(rep);
- u >> intret;
- if (intret < 0) return intret;
- u >> res;
- if (!u.okdone()) {
- fprintf(stderr, "rsm_client::call_m: failed to unmarshall the reply.\n"
- "You probably forgot to set the reply string in "
- "rsm::client_invoke, or you may call RPC 0x%x with wrong return "
- "type\n", proc);
- VERIFY(0);
- return rpc_const::unmarshal_reply_failure;
- }
- unmarshall u1(res);
- u1 >> r;
- if(!u1.okdone()) {
- fprintf(stderr, "rsm_client::call_m: failed to unmarshall the reply.\n"
- "You are probably calling RPC 0x%x with wrong return "
- "type.\n", proc);
- VERIFY(0);
- return rpc_const::unmarshal_reply_failure;
- }
- return intret;
+ string rep;
+ string res;
+ int intret = invoke(proc, rep, req);
+ VERIFY( intret == rsm_client_protocol::OK );
+ unmarshall u(rep, false);
+ u >> intret;
+ if (intret < 0) return intret;
+ u >> res;
+ if (!u.okdone()) {
+ cerr << "rsm_client::call_m: failed to unmarshall the reply." << endl;
+ cerr << "You probably forgot to set the reply string in "
+ "rsm::client_invoke, or you may have called RPC 0x" << hex <<
+ proc << " with the wrong return type" << endl;
+ VERIFY(0);
+ return rpc_const::unmarshal_reply_failure;
+ }
+ unmarshall u1(res, false);
+ u1 >> r;
+ if(!u1.okdone()) {
+ cerr << "rsm_client::call_m: failed to unmarshall the reply." << endl;
+ cerr << "You are probably calling RPC 0x" << hex << proc <<
+ " with the wrong return type." << endl;
+ VERIFY(0);
+ return rpc_const::unmarshal_reply_failure;
+ }
+ return intret;