pEpObjCAdapter/PEPSession.m
changeset 250 371630c05842
parent 249 08abeb4fb445
child 251 0002fa8d58fa
     1.1 --- a/pEpObjCAdapter/PEPSession.m	Wed Sep 27 17:34:37 2017 +0200
     1.2 +++ b/pEpObjCAdapter/PEPSession.m	Thu Sep 28 18:40:25 2017 +0200
     1.3 @@ -394,7 +394,10 @@
     1.4  - (nonnull NSString *)getLog
     1.5  {
     1.6      char *data;
     1.7 -    get_crashdump_log(self.session, 0, &data);
     1.8 +    @synchronized(self) {
     1.9 +        get_crashdump_log(_session, 0, &data);
    1.10 +    }
    1.11 +    
    1.12      NSString *logString = [NSString stringWithUTF8String:data];
    1.13      return logString;
    1.14  }
    1.15 @@ -471,7 +474,9 @@
    1.16  - (NSArray<PEPLanguage *> * _Nonnull)languageList
    1.17  {
    1.18      char *chLangs;
    1.19 -    get_languagelist(self.session, &chLangs);
    1.20 +    @synchronized(self) {
    1.21 +        get_languagelist(_session, &chLangs);
    1.22 +    }
    1.23      NSString *parserInput = [NSString stringWithUTF8String:chLangs];
    1.24  
    1.25      NSMutableArray<NSString *> *tokens = [NSMutableArray array];