From 26ccef90fcf9250ae074bdd122371afd07d24156 Mon Sep 17 00:00:00 2001 From: Daniel Masato Date: Mon, 23 Mar 2020 19:22:25 +0000 Subject: [PATCH 1/2] Fix server bug preventing recording directory from being recognised after successful creation When a recording directory doesn't exist, the server creates it successfully but the QFileInfo object holding the directory information is not updated as the information is cached by default. The server then exits unexpectedly as the check on the directory existence incorrectly fails. Disable caching to resolve the issue. --- src/recorder/jamrecorder.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/recorder/jamrecorder.cpp b/src/recorder/jamrecorder.cpp index 3008849d..c9623b0a 100755 --- a/src/recorder/jamrecorder.cpp +++ b/src/recorder/jamrecorder.cpp @@ -112,7 +112,8 @@ CJamSession::CJamSession(QDir recordBaseDir) : vecptrJamClients (MAX_NUM_CHANNELS), jamClientConnections() { - const QFileInfo fi(sessionDir.absolutePath()); + QFileInfo fi(sessionDir.absolutePath()); + fi.setCaching(false); if (!fi.exists() && !QDir().mkpath(sessionDir.absolutePath())) { @@ -296,7 +297,8 @@ QMap> CJamSession::TracksFromSessionDir(const QString */ void CJamRecorder::Init(const CServer* server) { - const QFileInfo fi(recordBaseDir.absolutePath()); + QFileInfo fi(recordBaseDir.absolutePath()); + fi.setCaching(false); if (!fi.exists() && !QDir().mkpath(recordBaseDir.absolutePath())) { From 263a2bcbf26201d76de2332d3d93b63d9b6a49e0 Mon Sep 17 00:00:00 2001 From: Daniel Masato Date: Mon, 23 Mar 2020 19:41:21 +0000 Subject: [PATCH 2/2] Update C++11 compiler flag --- Jamulus.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jamulus.pro b/Jamulus.pro index c082665f..f4e91acb 100755 --- a/Jamulus.pro +++ b/Jamulus.pro @@ -104,7 +104,7 @@ win32 { OTHER_FILES += android/AndroidManifest.xml } else:unix { # we want to compile with C++11 - QMAKE_CXXFLAGS += -std=c++0x + QMAKE_CXXFLAGS += -std=c++11 # we assume that stdint.h is always present in a Linux system DEFINES += HAVE_STDINT_H