diff options
author | Mark Janes <mark.a.janes@intel.com> | 2016-08-16 13:46:32 -0700 |
---|---|---|
committer | Mark Janes <mark.a.janes@intel.com> | 2017-06-19 14:04:47 -0700 |
commit | 341363d7cd5119e4dfb086e1eb1f02557b157885 (patch) | |
tree | 4b2a5620cde46334f78d31315824cfd06fee92a9 /retrace/daemon/ui/main.cpp | |
parent | ec2caf88f8f7d01e59d4840aab0bcb5afe174f60 (diff) |
Allow frameretrace to connect to remote host
Hosts other than localhost will expect frame_retrace_server to be
started on the remote system with the default port.
Diffstat (limited to 'retrace/daemon/ui/main.cpp')
-rw-r--r-- | retrace/daemon/ui/main.cpp | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/retrace/daemon/ui/main.cpp b/retrace/daemon/ui/main.cpp index b54a306d..024ff3a8 100644 --- a/retrace/daemon/ui/main.cpp +++ b/retrace/daemon/ui/main.cpp @@ -62,24 +62,6 @@ using glretrace::QRenderBookmark; using glretrace::ServerSocket; using glretrace::Socket; -void exec_retracer(const char *main_exe, int port) { - // frame_retrace_server should be at the same path as frame_retrace - std::string server_exe(main_exe); - size_t last_sep = server_exe.rfind('/'); - if (last_sep != std::string::npos) - server_exe.resize(last_sep + 1); - else - server_exe = std::string(""); - server_exe += "frame_retrace_server"; - - std::stringstream port_s; - port_s << port; - const char *const args[] = {server_exe.c_str(), - "-p", - port_s.str().c_str(), - NULL}; - glretrace::fork_execv(server_exe.c_str(), args); -} Q_DECLARE_METATYPE(QList<glretrace::BarMetrics>) @@ -94,19 +76,8 @@ int main(int argc, char *argv[]) { Logger::Create(); Logger::SetSeverity(glretrace::WARN); Socket::Init(); - - int port = 0; - { - ServerSocket sock(0); - port = sock.GetPort(); - // port = 53135; - } - // exec_retracer(argv[0], port); - exec_retracer(argv[0], port); Logger::Begin(); - GRLOGF(glretrace::WARN, "using port: %d", port); - FrameRetraceStub::Init(port); QGuiApplication app(argc, argv); app.setOrganizationName("Open Source Technology Center"); app.setOrganizationDomain("intel.com"); @@ -133,7 +104,6 @@ int main(int argc, char *argv[]) { glretrace::FrameImages::instance()); ret = app.exec(); } - FrameRetraceStub::Shutdown(); ::google::protobuf::ShutdownProtobufLibrary(); Logger::Destroy(); Socket::Cleanup(); |