diff options
Diffstat (limited to 'src/profiling/ProfilingConnectionFactory.cpp')
-rw-r--r-- | src/profiling/ProfilingConnectionFactory.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/profiling/ProfilingConnectionFactory.cpp b/src/profiling/ProfilingConnectionFactory.cpp index 1d264def57..7849b7e21e 100644 --- a/src/profiling/ProfilingConnectionFactory.cpp +++ b/src/profiling/ProfilingConnectionFactory.cpp @@ -30,6 +30,8 @@ std::unique_ptr<IProfilingConnection> ProfilingConnectionFactory::GetProfilingCo // ProfilingConnectionDumpToFileDecorator is returned. // 3: If both incoming and outgoing capture files are specified and "file only" then a FileOnlyProfilingConnection // decorated by a ProfilingConnectionDumpToFileDecorator is returned. + // 4. There is now another option if m_FileOnly == true and there are ILocalPacketHandlers specified + // we can create a FileOnlyProfilingConnection without a file dump if ((!options.m_IncomingCaptureFile.empty() || !options.m_OutgoingCaptureFile.empty()) && !options.m_FileOnly) { // This is type 2. @@ -42,6 +44,11 @@ std::unique_ptr<IProfilingConnection> ProfilingConnectionFactory::GetProfilingCo return std::make_unique<ProfilingConnectionDumpToFileDecorator>( std::make_unique<FileOnlyProfilingConnection>(options), options); } + else if (options.m_FileOnly && !options.m_LocalPacketHandlers.empty()) + { + // This is the type 4. + return std::make_unique<FileOnlyProfilingConnection>(options); + } else { // This is type 1. |