summaryrefslogtreecommitdiffstats
path: root/common/pipeline.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2015-01-18 14:29:08 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2015-01-18 14:29:08 +0100
commitd417f01e2eebeedfaae76b40667372bd0fb21fea (patch)
treeab0749c576e0c3fe4ff621c50cbdc038beab2185 /common/pipeline.cpp
parent47b4442c585a25b2e4b857f2d9e3ab371d942c19 (diff)
downloadsink-d417f01e2eebeedfaae76b40667372bd0fb21fea.tar.gz
sink-d417f01e2eebeedfaae76b40667372bd0fb21fea.zip
Use jobs in queries, sync works again.
Diffstat (limited to 'common/pipeline.cpp')
-rw-r--r--common/pipeline.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/common/pipeline.cpp b/common/pipeline.cpp
index 339a39c..dda7671 100644
--- a/common/pipeline.cpp
+++ b/common/pipeline.cpp
@@ -106,15 +106,21 @@ Async::Job<void> Pipeline::newEntity(void const *command, size_t size)
106 { 106 {
107 flatbuffers::Verifier verifyer(reinterpret_cast<const uint8_t *>(command), size); 107 flatbuffers::Verifier verifyer(reinterpret_cast<const uint8_t *>(command), size);
108 if (!Akonadi2::Commands::VerifyCreateEntityBuffer(verifyer)) { 108 if (!Akonadi2::Commands::VerifyCreateEntityBuffer(verifyer)) {
109 qWarning() << "invalid buffer"; 109 qWarning() << "invalid buffer, not a create entity buffer";
110 return Async::null<void>(); 110 return Async::null<void>();
111 } 111 }
112 } 112 }
113
114 auto createEntity = Akonadi2::Commands::GetCreateEntity(command); 113 auto createEntity = Akonadi2::Commands::GetCreateEntity(command);
115 114
116 //TODO rename createEntitiy->domainType to bufferType 115 //TODO rename createEntitiy->domainType to bufferType
117 const QString entityType = QString::fromUtf8(reinterpret_cast<char const*>(createEntity->domainType()->Data()), createEntity->domainType()->size()); 116 const QString entityType = QString::fromUtf8(reinterpret_cast<char const*>(createEntity->domainType()->Data()), createEntity->domainType()->size());
117 {
118 flatbuffers::Verifier verifyer(reinterpret_cast<const uint8_t *>(createEntity->delta()->Data()), createEntity->delta()->size());
119 if (!Akonadi2::VerifyEntityBuffer(verifyer)) {
120 qWarning() << "invalid buffer, not an entity buffer";
121 return Async::null<void>();
122 }
123 }
118 auto entity = Akonadi2::GetEntity(createEntity->delta()->Data()); 124 auto entity = Akonadi2::GetEntity(createEntity->delta()->Data());
119 125
120 //Add metadata buffer 126 //Add metadata buffer