Mv trustwords DB setup to PEPSession.init
authorDirk Zimmermann <dirk@pep-project.org>
Mon, 07 Mar 2016 09:34:45 +0100
changeset 100c2f33f275d55
parent 99 d576c77bf81b
child 101 77f011e32818
Mv trustwords DB setup to PEPSession.init
pEpiOSAdapter/PEPSession.m
     1.1 --- a/pEpiOSAdapter/PEPSession.m	Fri Mar 04 12:30:12 2016 +0100
     1.2 +++ b/pEpiOSAdapter/PEPSession.m	Mon Mar 07 09:34:45 2016 +0100
     1.3 @@ -65,7 +65,6 @@
     1.4  + (void)dispatchAsyncOnSession:(PEPSessionBlock)block
     1.5  {
     1.6      dispatch_async([self sharedSessionQueue], ^{
     1.7 -        [self setupTrustWordsDB];
     1.8          PEPSession *pepSession = [[PEPSession alloc] init];
     1.9          block(pepSession);
    1.10      });
    1.11 @@ -73,7 +72,6 @@
    1.12  
    1.13  + (void)dispatchSyncOnSession:(PEPSessionBlock)block
    1.14  {
    1.15 -    [self setupTrustWordsDB];
    1.16      PEPSession *pepSession = [[PEPSession alloc] init];
    1.17      block(pepSession);
    1.18  }
    1.19 @@ -88,6 +86,8 @@
    1.20  
    1.21  - (id)init
    1.22  {
    1.23 +    [PEPSession setupTrustWordsDB];
    1.24 +
    1.25      PEP_STATUS status = init(&_session);
    1.26  
    1.27      if (status != PEP_STATUS_OK) {