IOS-1475 Use PEPSync as session factory. IOS-1475_exp_dirk_001
authorDirk Zimmermann <dz@pep.security>
Fri, 15 Mar 2019 16:14:50 +0100
branchIOS-1475_exp_dirk_001
changeset 898f15b41ff5c8c
parent 897 a1c583ffca0e
child 899 56a86bfadc43
IOS-1475 Use PEPSync as session factory.
pEpObjCAdapter/PEPInternalSession.m
     1.1 --- a/pEpObjCAdapter/PEPInternalSession.m	Fri Mar 15 16:14:50 2019 +0100
     1.2 +++ b/pEpObjCAdapter/PEPInternalSession.m	Fri Mar 15 16:14:50 2019 +0100
     1.3 @@ -25,6 +25,7 @@
     1.4  #import "NSNumber+PEPRating.h"
     1.5  #import "NSMutableDictionary+PEP.h"
     1.6  #import "PEPLock.h"
     1.7 +#import "PEPSync.h"
     1.8  
     1.9  #import "pEpEngine.h"
    1.10  
    1.11 @@ -37,6 +38,7 @@
    1.12          [PEPInternalSession setupTrustWordsDB];
    1.13  
    1.14          NSError *error = nil;
    1.15 +        _session = [PEPSync createSession:&error];
    1.16  
    1.17          if (error) {
    1.18              return nil;
    1.19 @@ -47,6 +49,7 @@
    1.20  
    1.21  - (void)dealloc
    1.22  {
    1.23 +    [PEPSync releaseSession:_session];
    1.24  }
    1.25  
    1.26  #pragma mark - CONFIG