pEpObjCAdapter/PEPSession.m
changeset 216 f3f9abeb7c2b
parent 213 959a115bc0f7
child 218 fcc791d5b1fe
     1.1 --- a/pEpObjCAdapter/PEPSession.m	Mon Sep 04 17:28:50 2017 +0200
     1.2 +++ b/pEpObjCAdapter/PEPSession.m	Mon Sep 04 18:48:17 2017 +0200
     1.3 @@ -14,6 +14,7 @@
     1.4  #import "PEPLanguage.h"
     1.5  #import "PEPCSVScanner.h"
     1.6  #import "NSArray+Extension.h"
     1.7 +#import "NSDictionary+Extension.h"
     1.8  
     1.9  @implementation PEPSession
    1.10  
    1.11 @@ -78,10 +79,23 @@
    1.12      release(_session);
    1.13  }
    1.14  
    1.15 +- (void)debugOutPutMessageDict:(nonnull PEPDict *)src
    1.16 +{
    1.17 +    NSString *from = src[kPepFrom][kPepAddress];
    1.18 +    NSArray *tos = src[kPepTo];
    1.19 +    NSString *to = tos[0][kPepAddress];
    1.20 +    NSString *msgID = src[kPepID];
    1.21 +    NSString *fileName = [NSString stringWithFormat:@"from(%@)_to(%@)_(%@)",
    1.22 +                          from, to, msgID];
    1.23 +    [src debugSaveToFilePath:fileName];
    1.24 +}
    1.25 +
    1.26  - (PEP_rating)decryptMessageDict:(nonnull PEPDict *)src
    1.27                              dest:(PEPDict * _Nullable * _Nullable)dst
    1.28                              keys:(PEPStringList * _Nullable * _Nullable)keys
    1.29  {
    1.30 +    [self debugOutPutMessageDict:src];
    1.31 +
    1.32      message * _src = PEP_messageDictToStruct(src);
    1.33      message * _dst = NULL;
    1.34      stringlist_t * _keys = NULL;