summaryrefslogtreecommitdiffstats
path: root/common/pipeline.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-06-26 14:40:13 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-06-26 14:40:13 +0200
commit874b0d2be32e2edffedd59ab17bf821456757e29 (patch)
tree91c6c28f82b497455f5df85926e701f43c2993c1 /common/pipeline.cpp
parentcb81ef8f69f6a48ed505f5aef50c62a10aa67283 (diff)
downloadsink-874b0d2be32e2edffedd59ab17bf821456757e29.tar.gz
sink-874b0d2be32e2edffedd59ab17bf821456757e29.zip
Avoid unnecesary warnings
Diffstat (limited to 'common/pipeline.cpp')
-rw-r--r--common/pipeline.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/common/pipeline.cpp b/common/pipeline.cpp
index e3b9180..976a83f 100644
--- a/common/pipeline.cpp
+++ b/common/pipeline.cpp
@@ -115,11 +115,13 @@ void Pipeline::startTransaction()
115 //FIXME this is a temporary measure to recover from a failure to open the named databases correctly. 115 //FIXME this is a temporary measure to recover from a failure to open the named databases correctly.
116 //Once the actual problem is fixed it will be enough to simply crash if we open the wrong database (which we check in openDatabase already). 116 //Once the actual problem is fixed it will be enough to simply crash if we open the wrong database (which we check in openDatabase already).
117 //It seems like the validateNamedDatabase calls actually stops the mdb_put failures during sync... 117 //It seems like the validateNamedDatabase calls actually stops the mdb_put failures during sync...
118 while (!d->transaction.validateNamedDatabases()) { 118 if (d->storage.exists()) {
119 Warning() << "Opened an invalid transaction!!!!!!"; 119 while (!d->transaction.validateNamedDatabases()) {
120 d->transaction = std::move(storage().createTransaction(Storage::ReadWrite, [](const Sink::Storage::Error &error) { 120 Warning() << "Opened an invalid transaction!!!!!!";
121 Warning() << error.message; 121 d->transaction = std::move(storage().createTransaction(Storage::ReadWrite, [](const Sink::Storage::Error &error) {
122 })); 122 Warning() << error.message;
123 }));
124 }
123 } 125 }
124} 126}
125 127