@@ -38,8 +38,8 @@ namespace litecore { namespace repl {
3838 :Worker(puller, " inc" )
3939 ,_puller(puller)
4040 {
41- _passive = _options. pull <= kC4Passive ;
42- _important = false ;
41+ _passive = _options-> pull <= kC4Passive ;
42+ _importance = false ;
4343 static atomic<uint32_t > sRevSignpostCount {0 };
4444 _serialNumber = ++sRevSignpostCount ;
4545 }
@@ -71,7 +71,7 @@ namespace litecore { namespace repl {
7171 _revMessage->property (" history" _sl),
7272 _revMessage->boolProperty (" deleted" _sl),
7373 _revMessage->boolProperty (" noconflicts" _sl)
74- || _options. noIncomingConflicts ());
74+ || _options-> noIncomingConflicts ());
7575 _rev->deltaSrcRevID = _revMessage->property (" deltaSrc" _sl);
7676 slice sequenceStr = _revMessage->property (slice (" sequence" ));
7777 _remoteSequence = RemoteSequence (sequenceStr);
@@ -121,11 +121,11 @@ namespace litecore { namespace repl {
121121 _revMessage = nullptr ;
122122
123123 _mayContainBlobs = jsonBody.containsBytes (" \" digest\" " _sl);
124- _mayContainEncryptedProperties = !_options. disablePropertyDecryption ()
124+ _mayContainEncryptedProperties = !_options-> disablePropertyDecryption ()
125125 && MayContainPropertiesToDecrypt (jsonBody);
126126
127127 // Decide whether to continue now (on the Puller thread) or asynchronously on my own:
128- if (_options. pullValidator || jsonBody.size > kMaxImmediateParseSize
128+ if (_options-> pullValidator || jsonBody.size > kMaxImmediateParseSize
129129 || _mayContainBlobs || _mayContainEncryptedProperties)
130130 enqueue (FUNCTION_TO_QUEUE (IncomingRev::parseAndInsert), move (jsonBody));
131131 else
@@ -140,13 +140,13 @@ namespace litecore { namespace repl {
140140 rev->owner = this ;
141141
142142 // Do not purge if the auto-purge is not enabled:
143- if (!_options. enableAutoPurge ()) {
143+ if (!_options-> enableAutoPurge ()) {
144144 finish ();
145145 return ;
146146 }
147147
148148 // Call the custom validation function if any:
149- if (_options. pullValidator ) {
149+ if (_options-> pullValidator ) {
150150 // Revoked rev body is empty when sent to the filter:
151151 auto body = Dict::emptyDict ();
152152 if (!performPullValidation (body))
@@ -168,7 +168,7 @@ namespace litecore { namespace repl {
168168 if (!fleeceDoc)
169169 err = C4Error::make (FleeceDomain, (int )encodeErr, " Incoming rev failed to encode" _sl);
170170
171- } else if (_options. pullValidator || _mayContainBlobs || _mayContainEncryptedProperties) {
171+ } else if (_options-> pullValidator || _mayContainBlobs || _mayContainEncryptedProperties) {
172172 // It's a delta, but we need the entire document body now because either it has to be
173173 // passed to the validation function, it may contain new blobs to download, or it may
174174 // have properties to decrypt.
@@ -178,7 +178,7 @@ namespace litecore { namespace repl {
178178 if (!fleeceDoc) {
179179 // Don't have the body of the source revision. This might be because I'm in
180180 // no-conflict mode and the peer is trying to push me a now-obsolete revision.
181- if (_options. noIncomingConflicts ())
181+ if (_options-> noIncomingConflicts ())
182182 err = {WebSocketDomain, 409 };
183183 else
184184 err = C4Error::printf (LiteCoreDomain, kC4ErrorDeltaBaseUnknown ,
@@ -208,7 +208,7 @@ namespace litecore { namespace repl {
208208 // no longer accessible (not in any channel the client has access to.)
209209 if (root[" _removed" _sl].asBool ()) {
210210 _rev->flags |= kRevPurged ;
211- if (!_options. enableAutoPurge ()) {
211+ if (!_options-> enableAutoPurge ()) {
212212 finish ();
213213 return ;
214214 }
@@ -220,8 +220,8 @@ namespace litecore { namespace repl {
220220 C4Error error;
221221 decryptedRoot = DecryptDocumentProperties (_rev->docID ,
222222 root,
223- _options. propertyDecryptor ,
224- _options. callbackContext ,
223+ _options-> propertyDecryptor ,
224+ _options-> callbackContext ,
225225 &error);
226226 if (decryptedRoot) {
227227 root = decryptedRoot;
@@ -277,10 +277,10 @@ namespace litecore { namespace repl {
277277
278278 // Calls the custom pull validator if available.
279279 bool IncomingRev::performPullValidation (Dict body) {
280- if (_options. pullValidator ) {
281- if (!_options. pullValidator (nullslice, // TODO: Collection support
280+ if (_options-> pullValidator ) {
281+ if (!_options-> pullValidator (nullslice, // TODO: Collection support
282282 _rev->docID , _rev->revID , _rev->flags , body,
283- _options. callbackContext )) {
283+ _options-> callbackContext )) {
284284 failWithError (WebSocketDomain, 403 , " rejected by validation function" _sl);
285285 return false ;
286286 }
@@ -372,12 +372,6 @@ namespace litecore { namespace repl {
372372 }
373373
374374
375- int IncomingRev::progressNotificationLevel () const {
376- return _puller ? _puller->progressNotificationLevel () : 0 ;
377- }
378-
379-
380-
381375 Worker::ActivityLevel IncomingRev::computeActivityLevel () const {
382376 if (Worker::computeActivityLevel () == kC4Busy || _pendingCallbacks > 0
383377 || (_blob != _pendingBlobs.end ())) {
0 commit comments