Commit d6a91eee authored by Lukas Appelhans's avatar Lukas Appelhans
Browse files

Fix another endless loop

parent da5e3e4d
...@@ -248,9 +248,11 @@ void Backend::setStatus(Backend::Status s, QObject * cO, const char * cS) ...@@ -248,9 +248,11 @@ void Backend::setStatus(Backend::Status s, QObject * cO, const char * cS)
lockinfo.l_start = 0; lockinfo.l_start = 0;
lockinfo.l_len = 0; lockinfo.l_len = 0;
setStatus(Backend::StatusWaitingForLock);
if (fcntl(d->lockFileHandle->handle(), F_SETLK, &lockinfo) == -1) { if (fcntl(d->lockFileHandle->handle(), F_SETLK, &lockinfo) == -1) {
akabeiDebug() << "No lock for us!"; akabeiDebug() << "No lock for us!";
setStatus(Backend::StatusWaitingForLock);
connect(&d->lockWatcher, SIGNAL(finished()), this, SLOT(__k__lockGranted()));//TODO: Check if this works!!!!! connect(&d->lockWatcher, SIGNAL(finished()), this, SLOT(__k__lockGranted()));//TODO: Check if this works!!!!!
QFuture<void> lockF = QtConcurrent::run(d, &BackendPrivate::getLock); QFuture<void> lockF = QtConcurrent::run(d, &BackendPrivate::getLock);
d->lockWatcher.setFuture(lockF); d->lockWatcher.setFuture(lockF);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment