summaryrefslogtreecommitdiffstats
path: root/slobrok/src/tests/startsome/rpc_info.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'slobrok/src/tests/startsome/rpc_info.cpp')
-rw-r--r--slobrok/src/tests/startsome/rpc_info.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/slobrok/src/tests/startsome/rpc_info.cpp b/slobrok/src/tests/startsome/rpc_info.cpp
index 036c486fe4f..0f8739d12be 100644
--- a/slobrok/src/tests/startsome/rpc_info.cpp
+++ b/slobrok/src/tests/startsome/rpc_info.cpp
@@ -12,16 +12,16 @@ public:
void GetReq(FRT_RPCRequest **req, FRT_Supervisor *supervisor)
{
- if ((*req) != NULL)
+ if ((*req) != nullptr)
(*req)->SubRef();
(*req) = supervisor->AllocRPCRequest();
}
void FreeReqs(FRT_RPCRequest *r1, FRT_RPCRequest *r2)
{
- if (r1 != NULL)
+ if (r1 != nullptr)
r1->SubRef();
- if (r2 != NULL)
+ if (r2 != nullptr)
r2->SubRef();
}
@@ -75,11 +75,11 @@ public:
}
bool verbose = (_argc > 2 && strcmp(_argv[2], "verbose") == 0);
- FRT_Supervisor supervisor;
+ fnet::frt::StandaloneFRT server;
+ FRT_Supervisor & supervisor = server.supervisor();
FRT_Target *target = supervisor.GetTarget(_argv[1]);
- FRT_RPCRequest *m_list = NULL;
- FRT_RPCRequest *info = NULL;
- supervisor.Start();
+ FRT_RPCRequest *m_list = nullptr;
+ FRT_RPCRequest *info = nullptr;
GetReq(&info, &supervisor);
info->SetMethodName("frt.rpc.ping");
@@ -87,7 +87,6 @@ public:
if (info->IsError()) {
fprintf(stderr, "Error talking to %s\n", _argv[1]);
FreeReqs(m_list, info);
- supervisor.ShutDown(true);
return 1;
}
@@ -125,7 +124,6 @@ public:
}
FreeReqs(m_list, info);
target->SubRef();
- supervisor.ShutDown(true);
return 0;
}
};