From b6f0cad88921938f96d2491c7a7306f51a7c43d2 Mon Sep 17 00:00:00 2001 From: Dan Nagle Date: Sun, 20 Aug 2023 12:28:12 -0500 Subject: [PATCH] threaded CLI traffic generator requires at least Qt 5.10 --- src/main.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 763cde63..c09c0b7a 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -961,6 +961,15 @@ int main(int argc, char *argv[]) if(maxrate) { OUTIF() << "Max rate traffic generator will use separate sockets per thread"; + + +// Threaded traffic generator requires at least Qt 5.10 (which the AppImage does not use yet) +#if QT_VERSION < QT_VERSION_CHECK(5, 10, 0) + QUdpSocket sock; + QTextStream out(stdout); + intenseTrafficGenerator(out, sock, addy, port, dataString, bps, rate, stopnum, usdelay); +#else + QList threadedTraffic; int max_threads = QThread::idealThreadCount(); for(int thread_i = 0; thread_i < max_threads; thread_i++ ) { @@ -986,6 +995,9 @@ int main(int argc, char *argv[]) QThread::sleep(1); } + +#endif + } else { int done = intenseTrafficGenerator(out, sock, addy, port, dataString, bps, rate, stopnum, usdelay); return done;