IOSAD-178 Decorate getLogWithError IOSAD-178
authorDirk Zimmermann <dz@pep.security>
Mon, 20 Jul 2020 17:00:22 +0200
branchIOSAD-178
changeset 18409d5ab4c15c19
parent 1839 abbaadd1ec14
child 1841 6bb4517f7340
IOSAD-178 Decorate getLogWithError
pEpObjCAdapter/PEPInternalSession.m
     1.1 --- a/pEpObjCAdapter/PEPInternalSession.m	Mon Jul 20 17:00:22 2020 +0200
     1.2 +++ b/pEpObjCAdapter/PEPInternalSession.m	Mon Jul 20 17:00:22 2020 +0200
     1.3 @@ -785,8 +785,10 @@
     1.4  
     1.5  - (NSString * _Nullable)getLogWithError:(NSError * _Nullable * _Nullable)error
     1.6  {
     1.7 -    char *theChars = NULL;
     1.8 -    PEPStatus status = (PEPStatus) get_crashdump_log(_session, 0, &theChars);
     1.9 +    __block char *theChars = NULL;
    1.10 +    PEPStatus status = (PEPStatus) [self runWithPasswords:^PEP_STATUS(PEP_SESSION session) {
    1.11 +        return get_crashdump_log(session, 0, &theChars);
    1.12 +    }];
    1.13  
    1.14      if ([NSError setError:error fromPEPStatus:status]) {
    1.15          return nil;