IOSAD-172 Rename private var IOSAD-172
authorDirk Zimmermann <dz@pep.security>
Mon, 29 Jun 2020 16:39:43 +0200
branchIOSAD-172
changeset 1531be2d0d6fcf2f
parent 1530 9947a905a79d
child 1532 455eb191aa48
IOSAD-172 Rename private var
pEpObjCAdapter/PEPPassphraseCache.m
     1.1 --- a/pEpObjCAdapter/PEPPassphraseCache.m	Mon Jun 29 16:39:43 2020 +0200
     1.2 +++ b/pEpObjCAdapter/PEPPassphraseCache.m	Mon Jun 29 16:39:43 2020 +0200
     1.3 @@ -22,7 +22,7 @@
     1.4  @property (nonatomic) NSTimeInterval timeout;
     1.5  
     1.6  @property (nonatomic) dispatch_queue_t queue;
     1.7 -@property (nonatomic) NSMutableArray<PEPPassphraseCacheEntry *> *mutablePassphrases;
     1.8 +@property (nonatomic) NSMutableArray<PEPPassphraseCacheEntry *> *mutablePassphraseEntries;
     1.9  @property (nonatomic) dispatch_source_t timer;
    1.10  
    1.11  @end
    1.12 @@ -53,7 +53,7 @@
    1.13      if (self) {
    1.14          _timeout = timeout;
    1.15          _queue = dispatch_queue_create("PEPPassphraseCache Queue", DISPATCH_QUEUE_SERIAL);
    1.16 -        _mutablePassphrases = [NSMutableArray arrayWithCapacity:s_maxNumberOfPassphrases];
    1.17 +        _mutablePassphraseEntries = [NSMutableArray arrayWithCapacity:s_maxNumberOfPassphrases];
    1.18  
    1.19          // we have a strong reference to the timer, but the timer doesn't have one to us
    1.20          typeof(self) __weak weakSelf = self;
    1.21 @@ -83,9 +83,9 @@
    1.22      PEPPassphraseCacheEntry *entry = [[PEPPassphraseCacheEntry alloc]
    1.23                                        initWithPassphrase:passphrase];
    1.24      dispatch_sync(self.queue, ^{
    1.25 -        [self.mutablePassphrases addObject:entry];
    1.26 -        if (self.mutablePassphrases.count > s_maxNumberOfPassphrases) {
    1.27 -            [self.mutablePassphrases removeObjectAtIndex:0];
    1.28 +        [self.mutablePassphraseEntries addObject:entry];
    1.29 +        if (self.mutablePassphraseEntries.count > s_maxNumberOfPassphrases) {
    1.30 +            [self.mutablePassphraseEntries removeObjectAtIndex:0];
    1.31          }
    1.32      });
    1.33  }
    1.34 @@ -96,7 +96,7 @@
    1.35                                              arrayWithCapacity:s_maxNumberOfPassphrases + 1];
    1.36      [resultingPassphrases addObject:@""];
    1.37      dispatch_sync(self.queue, ^{
    1.38 -        for (PEPPassphraseCacheEntry *entry in self.mutablePassphrases) {
    1.39 +        for (PEPPassphraseCacheEntry *entry in self.mutablePassphraseEntries) {
    1.40              [resultingPassphrases addObject:entry.passphrase];
    1.41          }
    1.42      });
    1.43 @@ -110,14 +110,14 @@
    1.44      NSMutableArray *resultingPassphrases = [NSMutableArray
    1.45                                              arrayWithCapacity:s_maxNumberOfPassphrases];
    1.46  
    1.47 -    for (PEPPassphraseCacheEntry *entry in self.mutablePassphrases) {
    1.48 +    for (PEPPassphraseCacheEntry *entry in self.mutablePassphraseEntries) {
    1.49          if (![self isExpiredPassphraseEntry:entry]) {
    1.50              [resultingPassphrases addObject:entry];
    1.51          }
    1.52      }
    1.53  
    1.54 -    [self.mutablePassphrases removeAllObjects];
    1.55 -    [self.mutablePassphrases addObjectsFromArray:resultingPassphrases];
    1.56 +    [self.mutablePassphraseEntries removeAllObjects];
    1.57 +    [self.mutablePassphraseEntries addObjectsFromArray:resultingPassphrases];
    1.58  }
    1.59  
    1.60  - (void)resetTimeoutForPassphrase:(NSString *)passphrase
    1.61 @@ -128,7 +128,7 @@
    1.62      }
    1.63  
    1.64      dispatch_sync(self.queue, ^{
    1.65 -        for (PEPPassphraseCacheEntry *entry in self.mutablePassphrases) {
    1.66 +        for (PEPPassphraseCacheEntry *entry in self.mutablePassphraseEntries) {
    1.67              if ([entry.passphrase isEqualToString:passphrase]) {
    1.68                  entry.dateAdded = [NSDate date];
    1.69              }