comparison Framework/PushMode/ActivePushTransactions.cpp @ 8:4c3437217518

fix for compatibility with simplified OrthancPluginCppWrapper
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 05 Dec 2018 09:16:51 +0100
parents 95226b754d9e
children 7e207ade2f1a
comparison
equal deleted inserted replaced
7:151e29acbb13 8:4c3437217518
72 area_.WriteBucket(GetBucket(bucketIndex), data, size, compression_); 72 area_.WriteBucket(GetBucket(bucketIndex), data, size, compression_);
73 } 73 }
74 }; 74 };
75 75
76 76
77 void ActivePushTransactions::FinalizeTransaction(OrthancPluginContext* context, 77 void ActivePushTransactions::FinalizeTransaction(const std::string& transactionUuid,
78 const std::string& transactionUuid,
79 bool commit) 78 bool commit)
80 { 79 {
81 boost::mutex::scoped_lock lock(mutex_); 80 boost::mutex::scoped_lock lock(mutex_);
82 81
83 Content::iterator found = content_.find(transactionUuid); 82 Content::iterator found = content_.find(transactionUuid);
87 } 86 }
88 87
89 assert(found->second != NULL); 88 assert(found->second != NULL);
90 if (commit) 89 if (commit)
91 { 90 {
92 found->second->GetDownloadArea().Commit(context); 91 found->second->GetDownloadArea().Commit();
93 } 92 }
94 93
95 delete found->second; 94 delete found->second;
96 content_.erase(found); 95 content_.erase(found);
97 index_.Invalidate(transactionUuid); 96 index_.Invalidate(transactionUuid);
161 160
162 return uuid; 161 return uuid;
163 } 162 }
164 163
165 164
166 void ActivePushTransactions::Store(OrthancPluginContext* context, 165 void ActivePushTransactions::Store(const std::string& transactionUuid,
167 const std::string& transactionUuid,
168 size_t bucketIndex, 166 size_t bucketIndex,
169 const void* data, 167 const void* data,
170 size_t size) 168 size_t size)
171 { 169 {
172 boost::mutex::scoped_lock lock(mutex_); 170 boost::mutex::scoped_lock lock(mutex_);