IOS-2325 Decorate set_identity_flags IOSAD-178
authorDirk Zimmermann <dz@pep.security>
Mon, 20 Jul 2020 17:00:22 +0200
branchIOSAD-178
changeset 184790e3b5b94107
parent 1846 adff3793d56e
child 1848 6c00e8f00de3
IOS-2325 Decorate set_identity_flags
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 @@ -1004,7 +1004,10 @@
     1.4             error:(NSError * _Nullable * _Nullable)error
     1.5  {
     1.6      pEp_identity *ident = PEP_identityToStruct(identity);
     1.7 -    PEPStatus status = (PEPStatus) set_identity_flags(self.session, ident, flags);
     1.8 +
     1.9 +    PEPStatus status = (PEPStatus) [self runWithPasswords:^PEP_STATUS(PEP_SESSION session) {
    1.10 +        return set_identity_flags(session, ident, flags);
    1.11 +    }];
    1.12  
    1.13      if ([NSError setError:error fromPEPStatus:status]) {
    1.14          free_identity(ident);