IOSAD-172 Back out: Convert reEvaluateMessageDict IOSAD-172
authorDirk Zimmermann <dz@pep.security>
Sat, 27 Jun 2020 14:40:36 +0200
branchIOSAD-172
changeset 151414b6276f6ddc
parent 1513 f0f7bcb94640
child 1515 27d017b6255a
IOSAD-172 Back out: Convert reEvaluateMessageDict
pEpObjCAdapter/PEPInternalSession.m
     1.1 --- a/pEpObjCAdapter/PEPInternalSession.m	Sat Jun 27 14:40:06 2020 +0200
     1.2 +++ b/pEpObjCAdapter/PEPInternalSession.m	Sat Jun 27 14:40:36 2020 +0200
     1.3 @@ -190,23 +190,18 @@
     1.4                         status:(PEPStatus * _Nullable)status
     1.5                          error:(NSError * _Nullable * _Nullable)error
     1.6  {
     1.7 -    __block PEPRating *theRating = rating;
     1.8 -    __block message *_src = PEP_messageDictToStruct(messageDict);
     1.9 +    message *_src = PEP_messageDictToStruct(messageDict);
    1.10  
    1.11 -    __block stringlist_t *theKeys = NULL;
    1.12 +    stringlist_t *theKeys = NULL;
    1.13      if ([xKeyList count]) {
    1.14          theKeys = PEP_arrayToStringlist(xKeyList);
    1.15      }
    1.16  
    1.17 -    PEPStatus theStatus = (PEPStatus) [self runWithPasswords:^PEP_STATUS(PEP_SESSION session) {
    1.18 -        return re_evaluate_message_rating(session,
    1.19 -                                          _src,
    1.20 -                                          theKeys,
    1.21 -                                          (PEP_rating) *rating,
    1.22 -                                          (PEP_rating *) theRating);
    1.23 -    }];
    1.24 -
    1.25 -    *rating = *theRating;
    1.26 +    PEPStatus theStatus = (PEPStatus) re_evaluate_message_rating(_session,
    1.27 +                                                                 _src,
    1.28 +                                                                 theKeys,
    1.29 +                                                                 (PEP_rating) *rating,
    1.30 +                                                                 (PEP_rating *) rating);
    1.31  
    1.32      free_message(_src);
    1.33      free_stringlist(theKeys);