aboutsummaryrefslogtreecommitdiffstats
path: root/jrt_test/src/tests/mandatory-methods/extract-reflection.cpp
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2019-05-10 11:25:48 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2019-05-10 12:25:38 +0000
commit4412aace869986be3a1060f78f367841353d3384 (patch)
treef4b5e1f6da5eaf1563f3b2fd64779800acfd5796 /jrt_test/src/tests/mandatory-methods/extract-reflection.cpp
parent840d4e0578dc627b75bcd0050f1b253e84cc30ed (diff)
Simplify the supervisor responsibility
Diffstat (limited to 'jrt_test/src/tests/mandatory-methods/extract-reflection.cpp')
-rw-r--r--jrt_test/src/tests/mandatory-methods/extract-reflection.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/jrt_test/src/tests/mandatory-methods/extract-reflection.cpp b/jrt_test/src/tests/mandatory-methods/extract-reflection.cpp
index a465316343d..40c54980c11 100644
--- a/jrt_test/src/tests/mandatory-methods/extract-reflection.cpp
+++ b/jrt_test/src/tests/mandatory-methods/extract-reflection.cpp
@@ -9,16 +9,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();
}
@@ -72,11 +72,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;
for (int i = 0; i < 50; i++) {
GetReq(&info, &supervisor);
@@ -93,7 +93,6 @@ public:
fprintf(stderr, "Error talking to %s\n", _argv[1]);
info->Print();
FreeReqs(m_list, info);
- supervisor.ShutDown(true);
return 1;
}
@@ -131,7 +130,6 @@ public:
}
FreeReqs(m_list, info);
target->SubRef();
- supervisor.ShutDown(true);
return 0;
}
};