summaryrefslogtreecommitdiffstats
path: root/synchronizer/main.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-01-09 17:08:08 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-01-09 17:08:08 +0100
commita87b540b45ded2c2ad493fec4e82d22d5a417960 (patch)
tree97228290956812152e49158d4a7c0d668af6c842 /synchronizer/main.cpp
parent4603487f087fc9d15b3919d55d651e434fa3cc6a (diff)
downloadsink-a87b540b45ded2c2ad493fec4e82d22d5a417960.tar.gz
sink-a87b540b45ded2c2ad493fec4e82d22d5a417960.zip
Create the lockfiles in the data directory.
The ended up in the home directory.
Diffstat (limited to 'synchronizer/main.cpp')
-rw-r--r--synchronizer/main.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/synchronizer/main.cpp b/synchronizer/main.cpp
index c0c3c2d..afc3c26 100644
--- a/synchronizer/main.cpp
+++ b/synchronizer/main.cpp
@@ -36,6 +36,7 @@
36#include "listener.h" 36#include "listener.h"
37#include "log.h" 37#include "log.h"
38#include "test.h" 38#include "test.h"
39#include "definitions.h"
39 40
40SINK_DEBUG_AREA("main") 41SINK_DEBUG_AREA("main")
41 42
@@ -163,7 +164,7 @@ int main(int argc, char *argv[])
163 Sink::Log::setPrimaryComponent(instanceIdentifier); 164 Sink::Log::setPrimaryComponent(instanceIdentifier);
164 SinkLog() << "Starting: " << instanceIdentifier << resourceType; 165 SinkLog() << "Starting: " << instanceIdentifier << resourceType;
165 166
166 QLockFile lockfile(instanceIdentifier + ".lock"); 167 QLockFile lockfile(Sink::resourceStorageLocation(instanceIdentifier) + "/resource.lock");
167 lockfile.setStaleLockTime(500); 168 lockfile.setStaleLockTime(500);
168 if (!lockfile.tryLock(0)) { 169 if (!lockfile.tryLock(0)) {
169 SinkWarning() << "Failed to acquire exclusive lock on socket."; 170 SinkWarning() << "Failed to acquire exclusive lock on socket.";